I have created a custom payment gateway module. Everything works fine, except canceling the order from the backend.
The error: The order(s) cannot be canceled
Any ideas?
magento-1.8order-statusorderspayment-gateway
I have created a custom payment gateway module. Everything works fine, except canceling the order from the backend.
The error: The order(s) cannot be canceled
Any ideas?
Best Answer
If you look into the function
canCancel
underMage_Sales_Model_Order
then you can see what in what situations an order can or cannot be cancelled.The following need to be true before an order can be cancelled.
The full code is as follows.