Open
Description
When the IPN callback from Paypal is coming back few days after an echeck submission, the order get a history comment saying that the IPN Failed but change the order status to Validated instead of Canceled
Preconditions
- Magento 2.1.7, MySQL 5.7, PHP 7.0
- Nginx Server
Steps to reproduce
- Create an order and use Paypal to pay with a delayed payment (eCheck)
- Order status is changed to "Payment_reviewed"
- Paypal IPN callback is called on Magento website and returns a payment_status=failed (For example, there was insufficient funds on the customer bank account)
- Magento is adding the comment "IPN Failed" and changes the status to Validated
Expected result
- Magento is adding the comment "IPN Failed" and changes the status to Canceled
Actual result
- Magento is adding the comment "IPN Failed" and changes the status to Validated
There is clearly a problem in Magento/Paypal/Model/Ipn _registerPaymentFailure() where the order is canceled. Invoices should be canceled before the order because the order cancellation cause a Validated status. So it's the exact opposite of what should happen and results in orders shipped without a received payment.
This is huge and was there already in Magento 1. I dont understand why it wasn't fixed earlier.
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.