Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions PaymentTransactions/capture-previously-authorized-amount.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
constants = imp.load_source('modulename', 'constants.py')
from decimal import *

def capture_previously_authorized_amount():
def capture_previously_authorized_amount(transactionId):
merchantAuth = apicontractsv1.merchantAuthenticationType()
merchantAuth.name = constants.apiLoginId
merchantAuth.transactionKey = constants.transactionKey
Expand All @@ -15,9 +15,7 @@ def capture_previously_authorized_amount():
transactionrequest = apicontractsv1.transactionRequestType()
transactionrequest.transactionType = "priorAuthCaptureTransaction"
transactionrequest.amount = Decimal ('2.55')
transactionrequest.refTransId = "2245440574"


transactionrequest.refTransId = transactionId

createtransactionrequest = apicontractsv1.createTransactionRequest()
createtransactionrequest.merchantAuthentication = merchantAuth
Expand Down Expand Up @@ -55,4 +53,4 @@ def capture_previously_authorized_amount():
return response

if(os.path.basename(__file__) == os.path.basename(sys.argv[0])):
capture_previously_authorized_amount()
capture_previously_authorized_amount('12345678')
2 changes: 1 addition & 1 deletion list_of_sample_codes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ charge_tokenized_credit_card 1 0
credit_bank_account 1 0
debit_bank_account 1 1
refund_transaction 1 0
update_split_tender_group 1 1
update_split_tender_group 1 0
void_transaction 1 0
authorization_and_capture_continue 1 1
authorization_and_capture 1 1
Expand Down
6 changes: 5 additions & 1 deletion test-runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,12 @@ def capture_funds_authorized_through_another_channel(self):

def capture_previously_authorized_amount(self):
print("capture_previously_authorized_amount")

modl = imp.load_source('modulename', 'PaymentTransactions/authorize-credit-card.py')
response = modl.authorize_credit_card()

modl = imp.load_source('modulename', 'PaymentTransactions/capture-previously-authorized-amount.py')
return modl.capture_previously_authorized_amount()
return modl.capture_previously_authorized_amount(response.transactionResponse.transId)

def charge_credit_card(self):
print("charge_credit_card")
Expand Down