File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 1
1
import os , sys
2
2
import imp
3
+ import random
4
+
3
5
4
6
from authorizenet import apicontractsv1
5
7
from authorizenet .apicontrollers import *
8
10
from authorizenet .apicontractsv1 import bankAccountType , accountTypeEnum
9
11
10
12
def debit_bank_account ():
13
+
14
+ amount = str (round (random .random ()* 100 , 2 ))
15
+
11
16
merchantAuth = apicontractsv1 .merchantAuthenticationType ()
12
17
merchantAuth .name = constants .apiLoginId
13
18
merchantAuth .transactionKey = constants .transactionKey
@@ -24,7 +29,7 @@ def debit_bank_account():
24
29
25
30
transactionrequest = apicontractsv1 .transactionRequestType ()
26
31
transactionrequest .transactionType = "authCaptureTransaction"
27
- transactionrequest .amount = Decimal ('2.55' )
32
+ transactionrequest .amount = Decimal (amount )
28
33
transactionrequest .payment = payment
29
34
transactionrequest .payment .bankAccount = bankAccountType
30
35
You can’t perform that action at this time.
0 commit comments