I'm currently looking into the possibility of refunding a web_accept type payment for PayPal.
We accept payments on our website and i'd like to automatically refund a transaction. For example:
I have a web_accept payment: Web Accept Payment Received (Unique Transaction ID #XXXXXXXXX)
$sale = Sale::get('XXXXXXXXX', $apiContext);
My refund Sale:get() argument returns: 'Got Http response code 404 when accessing https://api.paypal.com/v1/payments/sale/6LN17852AX690712B.'
Which obviously isn't working. Any chance someone can help me out?
It is not possible to refund a web_accept
transaction via REST API. You will get this error
name:INVALID_RESOURCE_ID
message:The requested resource ID was not found.
So, you will need to use RefundTransaction API to refund this transaction.