Skip to content

Commit 0fc71a2

Browse files
author
brianmc
committed
Updated refund sample to show linked credit which does not need full card data
1 parent a62e257 commit 0fc71a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PaymentTransactions/refund-transaction.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def refund_transaction(refTransId):
1212
merchantAuth.transactionKey = constants.transactionKey
1313

1414
creditCard = apicontractsv1.creditCardType()
15-
creditCard.cardNumber = "4111111111111111"
16-
creditCard.expirationDate = "2020-12"
15+
creditCard.cardNumber = "0015"
16+
creditCard.expirationDate = "XXXX"
1717

1818
payment = apicontractsv1.paymentType()
1919
payment.creditCard = creditCard
@@ -40,6 +40,10 @@ def refund_transaction(refTransId):
4040
print "Transaction ID : %s" % response.transactionResponse.transId
4141
else:
4242
print "response code: %s" % response.messages.resultCode
43+
print "Message code: %s" % response.messages.message[0].code
44+
print "Message text: %s" % response.messages.message[0].text
45+
print "Transaction Error Code: %s" % response.transactionResponse.errors.error[0].errorCode
46+
print "Transaction Error Text: %s" % response.transactionResponse.errors.error[0].errorText
4347

4448
return response
4549

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy