Jump to content

Re-stock on payment failed


Recommended Posts

Hello, I'm writing a new Payment module and has been great so far. But I'm having trouble re-stocking the products if the payment has failed.

 

I defined 3 new order statuses, let's say: Custom Waiting, Custom Accepted, and Custom Rejected. Only Custom Accepted is logable.

 

When I go to the payment site, the order status is Custom Waiting. And if I change it to rejected it does not re-stock the items. I'm thinking on hooking the module to the action orderStatusChange and compare if newOrderState = Custom Rejected then reinject the items quantities in stock.

 

I want to know if this is the right way, or if there is another way to do this. I have Prestashop 1.5.3

 

I would appreciate any help you can give me.

Link to comment
Share on other sites

×
×
  • Create New...