File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 6
6
constants = imp .load_source ('modulename' , 'constants.py' )
7
7
from decimal import *
8
8
9
- def capture_previously_authorized_amount ():
9
+ def capture_previously_authorized_amount (transactionId ):
10
10
merchantAuth = apicontractsv1 .merchantAuthenticationType ()
11
11
merchantAuth .name = constants .apiLoginId
12
12
merchantAuth .transactionKey = constants .transactionKey
@@ -15,9 +15,7 @@ def capture_previously_authorized_amount():
15
15
transactionrequest = apicontractsv1 .transactionRequestType ()
16
16
transactionrequest .transactionType = "priorAuthCaptureTransaction"
17
17
transactionrequest .amount = Decimal ('2.55' )
18
- transactionrequest .refTransId = "2245440574"
19
-
20
-
18
+ transactionrequest .refTransId = transactionId
21
19
22
20
createtransactionrequest = apicontractsv1 .createTransactionRequest ()
23
21
createtransactionrequest .merchantAuthentication = merchantAuth
@@ -55,4 +53,4 @@ def capture_previously_authorized_amount():
55
53
return response
56
54
57
55
if (os .path .basename (__file__ ) == os .path .basename (sys .argv [0 ])):
58
- capture_previously_authorized_amount ()
56
+ capture_previously_authorized_amount ('12345678' )
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ charge_tokenized_credit_card 1 0
23
23
credit_bank_account 1 0
24
24
debit_bank_account 1 1
25
25
refund_transaction 1 0
26
- update_split_tender_group 1 1
26
+ update_split_tender_group 1 0
27
27
void_transaction 1 0
28
28
authorization_and_capture_continue 1 1
29
29
authorization_and_capture 1 1
Original file line number Diff line number Diff line change @@ -320,8 +320,12 @@ def capture_funds_authorized_through_another_channel(self):
320
320
321
321
def capture_previously_authorized_amount (self ):
322
322
print ("capture_previously_authorized_amount" )
323
+
324
+ modl = imp .load_source ('modulename' , 'PaymentTransactions/authorize-credit-card.py' )
325
+ response = modl .authorize_credit_card ()
326
+
323
327
modl = imp .load_source ('modulename' , 'PaymentTransactions/capture-previously-authorized-amount.py' )
324
- return modl .capture_previously_authorized_amount ()
328
+ return modl .capture_previously_authorized_amount (response . transactionResponse . transId )
325
329
326
330
def charge_credit_card (self ):
327
331
print ("charge_credit_card" )
You can’t perform that action at this time.
0 commit comments