Skip to content

Commit 295dcc4

Browse files
author
brianmc
committed
Used random amount for automated running
1 parent c9928fe commit 295dcc4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

PaymentTransactions/debit-bank-account.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import os, sys
22
import imp
3+
import random
4+
35

46
from authorizenet import apicontractsv1
57
from authorizenet.apicontrollers import *
@@ -8,6 +10,9 @@
810
from authorizenet.apicontractsv1 import bankAccountType, accountTypeEnum
911

1012
def debit_bank_account():
13+
14+
amount = str(round(random.random()*100, 2))
15+
1116
merchantAuth = apicontractsv1.merchantAuthenticationType()
1217
merchantAuth.name = constants.apiLoginId
1318
merchantAuth.transactionKey = constants.transactionKey
@@ -24,7 +29,7 @@ def debit_bank_account():
2429

2530
transactionrequest = apicontractsv1.transactionRequestType()
2631
transactionrequest.transactionType = "authCaptureTransaction"
27-
transactionrequest.amount = Decimal ('2.55')
32+
transactionrequest.amount = Decimal (amount)
2833
transactionrequest.payment = payment
2934
transactionrequest.payment.bankAccount = bankAccountType
3035

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy