when I canceled the order or payment fail the order has been canceled automatically, but actually when the payment fails the order status has not changed to canceled in magento2.

  • Which Payment method you are using? Dec 12, 2018 at 9:53
  • I am using Payumoney Payment gateway
    – Meera
    Dec 12, 2018 at 10:05

2 Answers 2


dose any one know how to change this code so it dosnt cancel order but retrieves the cart


        $this->_messageManager->addError("<strong>Error: </strong>" .__('Your transaction failed or has been cancelled! Please Try an alternative payment card.'). "<br/>");


Sorry for the late reply but this ay help. not so sure about it but for me it is working.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.