Vulnerability in EPiServer.Forms
I have created a campaign with a item discount on. When i save the cart as a purchase order the redemption count on the discount is increased. But my flow is a little different. I create the purchase order when the customer goes from cart page to checkout because i want to make sure the content does not change during checkout. So i do not want the redemption count on the discount to increase until the purchase order is put in status Completed. is this possible?
Unfortunately no, not an easy way to modify OrderForm for this. However what you can do is that if the customer does not complete the order, then you just can cancel the created order. that will invalidate the redemption.
The best way to cancel order is to use IPurchaseOrderProcessor.CancelOrder, then save it