Closed kilanoff closed 8 years ago
Could you add a unit test for this as well?
Looking at the documentation, the rules for issuing a refund are as follows:
When issuing a credit card refund, the request must include either a full card number and expiration, or previous transID and last 4 digits of the card number. If you don't have the last 4 digits, you can use getTransactionDetails to get the payment object needed to issue a refund.
I think the last 4 digits and transID should be sufficient. Also, the transID (rather, refTransId) field is required as part of the refund transaction so I'm not sure passing the full card number and expiration date is ever really needed.
https://developer.authorize.net/api/reference/index.html#payment-transactions-refund-a-transaction