@RichardH I have uploaded the relevant code to the following location:
https://codeshare.io/5NgYjJ
So in the sample code we have Sandbox Transaction ID #60107753969. The getRefundDetails() function would return something like the following:
[status] => settledSuccessfully
[amount] => 45.32
[card] => XXXX1111
[exp] => XXXX
That information is then sent to refundTransaction() so that setCardNumber() and setExpirationDate() have the necessary information. I grab 'status' and 'amount' for other verification purposes (Like checking the transaction is valid, or that the amount we're refunding doesn't exceed the original transaction amount).
When the Expiration Date is XXXX I get the following output:
Transaction Failed
Error code : 8
Error message : The credit card has expired.
But if I set the Expiration Date to 1218 I get a different result:
Transaction Response code : 1
Refund SUCCESS: 60111190246
Code : 1
Description : This transaction has been approved.
Which triggers a merchant email receipt to the email associated to my devleoper account letting me know that the transaction was processed.
========= ORDER INFORMATION =========
Invoice :
Description : Goods or Services
Amount : 2.23 (USD)
Payment Method: Visa xxxx1111
Transaction Type: Credit
============== Line Items ==============
============== RESULTS ==============
Response : This transaction has been approved.
Auth Code :
Transaction ID : 60111190246