File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import os , sys
22import imp
3+ import random
4+
35
46from authorizenet import apicontractsv1
57from authorizenet .apicontrollers import *
810from authorizenet .apicontractsv1 import bankAccountType , accountTypeEnum
911
1012def 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
You can’t perform that action at this time.
0 commit comments