File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66constants = imp .load_source ('modulename' , 'constants.py' )
77from decimal import *
88
9- def capture_previously_authorized_amount ():
9+ def capture_previously_authorized_amount (transactionId ):
1010 merchantAuth = apicontractsv1 .merchantAuthenticationType ()
1111 merchantAuth .name = constants .apiLoginId
1212 merchantAuth .transactionKey = constants .transactionKey
@@ -15,9 +15,7 @@ def capture_previously_authorized_amount():
1515 transactionrequest = apicontractsv1 .transactionRequestType ()
1616 transactionrequest .transactionType = "priorAuthCaptureTransaction"
1717 transactionrequest .amount = Decimal ('2.55' )
18- transactionrequest .refTransId = "2245440574"
19-
20-
18+ transactionrequest .refTransId = transactionId
2119
2220 createtransactionrequest = apicontractsv1 .createTransactionRequest ()
2321 createtransactionrequest .merchantAuthentication = merchantAuth
@@ -55,4 +53,4 @@ def capture_previously_authorized_amount():
5553 return response
5654
5755if (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
2323credit_bank_account 1 0
2424debit_bank_account 1 1
2525refund_transaction 1 0
26- update_split_tender_group 1 1
26+ update_split_tender_group 1 0
2727void_transaction 1 0
2828authorization_and_capture_continue 1 1
2929authorization_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):
320320
321321 def capture_previously_authorized_amount (self ):
322322 print ("capture_previously_authorized_amount" )
323+
324+ modl = imp .load_source ('modulename' , 'PaymentTransactions/authorize-credit-card.py' )
325+ response = modl .authorize_credit_card ()
326+
323327 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 )
325329
326330 def charge_credit_card (self ):
327331 print ("charge_credit_card" )
You can’t perform that action at this time.
0 commit comments