Open aarmitage opened 9 months ago
We're having the exact same issue with one of our client sites. Is this a known issue?
Craft version: Craft Pro 3.8.7 Commerce PayPal Checkout version: 1.3.4 Commerce version: 3.4.20.1 PHP version: 7.4.33 Database driver & version: MySQL 5.7.42
Description When some PayPal refunds are triggered in Craft, they're showing as failed. This has encouraged the site owner to try the refund again, with the second attempt also failing, but then when checking in PayPal several days later, both refund transactions have been processed and they've had to request the double refund to be returned from the customer.
It would appear that the affected refunds fail at the time of the request, but are later accepted and processed by PayPal. Looking at the gateway info on the refund, the
status
shows as 'PENDING' withstatus_details
reason as 'Echeck'. Echeck payments are determined by PayPal and can take up to 7 days to process, so I think Craft is unable to respond correctly to this status and the 'Failed' error message in the CP is misleading.To Reproduce How, and what happened?
Expected behavior If the payment returns a status of PENDING, then the status in Craft should show as 'Pending' and not 'Failed'. I'm guessing the payment is pending with PayPal until the Echeck is approved, at which point the payment is made, but there's no further call back to the site to update the status message in the transaction history.
Showing a pending status would indicate the refund may be processed successfully, but to check the PayPal account for confirmation for up to 7 days later.
Additional info
Additional context Screenshots attached.