File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-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
3
4
4
5
from authorizenet import apicontractsv1
5
6
from authorizenet .apicontrollers import *
6
7
constants = imp .load_source ('modulename' , 'constants.py' )
7
8
from decimal import *
8
9
9
10
def capture_funds_authorized_through_another_channel ():
11
+
12
+ amount = str (round (random .random ()* 100 , 2 ))
13
+
10
14
merchantAuth = apicontractsv1 .merchantAuthenticationType ()
11
15
merchantAuth .name = constants .apiLoginId
12
16
merchantAuth .transactionKey = constants .transactionKey
@@ -20,7 +24,7 @@ def capture_funds_authorized_through_another_channel():
20
24
21
25
transactionrequest = apicontractsv1 .transactionRequestType ()
22
26
transactionrequest .transactionType = "captureOnlyTransaction"
23
- transactionrequest .amount = Decimal ('1.55' )
27
+ transactionrequest .amount = Decimal (amount )
24
28
transactionrequest .payment = payment
25
29
transactionrequest .authCode = "ROHNFQ"
26
30
You can’t perform that action at this time.
0 commit comments