I want user to keep its shopping cart after payment failure.
Cart becomes empty when cancel the payment transaction in checkout.
How should I change the Failure.php
in Magento checkout module?
cartmagento2payment
I want user to keep its shopping cart after payment failure.
Cart becomes empty when cancel the payment transaction in checkout.
How should I change the Failure.php
in Magento checkout module?
Best Answer
You can not prevent a cart from being empty as the cart is converted into order. You can however set the cart as active again in your failure function.
In your failure function, try adding this code -:
Above code turns the previous cart/quote as active again.