I need to validate the stock amount of the products in the cart using a call to the ERP just before the cart is going to be submitted to the payment provider and has been upgraded to order.
The OrderIsPassedToCheckoutHandler notification cannot be the solution because in were the cart is already being transform into order and the stock in DW is already deducted.
I would like to have a notification that is fired just before DW enters the payment step and before the stock is deducted in DW. This way I can update the stock from the ERP before the order is complete and DW can make the stock validation based on the updated stock.
On my research for the solution I’ve used the BeforeCustomerAcceptedValueIsChanged notification that is in the last step of the checkout but this will not be 100% failsafe solution to the problem. Is there any better way to it?
Best,
Rui Silva