Trying to integrate ApplePay payments using Authorize.net authCaptureTransaction (https://developer.authorize.net/api/reference/index.html#mobile-in-app-transactions-create-an-apple-pay-transaction). Payment is authorized successfully.
But now trying to integrate refund operation using refundTransaction (https://developer.authorize.net/api/reference/index.html#payment-transactions-refund-a-transaction) which looks doesn't support ApplePay.
Here is require to pass "creditCard": { "cardNumber": "0015", "expirationDate": "XXXX" }
but ApplePay has only card token. Even trying to pass I have error:
The referenced transaction does not meet the criteria for issuing a credit.
also passing token doesn't help
"opaqueData": { "dataDescriptor": "COMMON.APPLE.INAPP.PAYMENT", "dataValue": 1234567890ABCDEF1111AAAA2222BBBB3333CCCC4444DDDD5555EEEE6666FFFF7777888899990000" }
error is
There was an error processing the payment data. Opaque data cannot be used for a linked credit
Can someone help to understand why no API support for ApplePay refund? Also using Merchant Interface here is possibility to refund ApplePay. Also void method works with ApplePay (https://developer.authorize.net/api/reference/index.html#payment-transactions-void-a-transaction)
BTW I am using https://github.com/AuthorizeNet/sdk-php (2.0.2 version)
To refund ApplePay transaction using refundTransaction API need to pass last four digits of tokennumber. This value can be taken from getTransactionDetailsRequest API (https://developer.authorize.net/api/reference/index.html#transaction-reporting-get-transaction-details) Example of getTransactionDetailsRequest:
refund API example:
Tokennumber is not the credit card number even it is not related to unique ApplePay device number. Looks AuthorizeNet generate his own number. Therefore need to request getTransactionDetailsRequest to get it.