1

Could anyone tell me how can I increment my product quantity stock when an order gets fails? I'm using Magento 2.3.5 and using a customized payment gateway.

The scenario is when I'm placing an order and proceeding with the custom payment gateway and returns with a failed order. At this moment I need to increase the product quantity stock.

Is there any way of doing this? Please help!

Thanks in advance.

1 Answer 1

0

I guess you are catching the payment failure in javascript ? Then what you need to do is just to make an ajax call to a new action where you will handle this by interacting with stock_items.

EDIT : I don't think magento decrease the stock if the payment fail. That would be a strange behaviour.

Your Answer

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

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