I have custom code that extends NotificationSubscriber and subscribes to the "Dynamicweb.Notifications.eCommerce.cart.CheckoutDone" event. In my custom code I dispatch the order to an external ERP system. My thought was that the event was only fired when the order was complete (i.e. payment was ok).
It turns out that the event is fired when a customer interrupts the payment process (i.e. cancels the payment at the external payment provider).
Is there a property on the Order I should check if the order was actually successful or should I use a different event all together? Should I check the Order.Complete property?
The reason I use the CheckoutDone event is because I must be able to downgrade the order to a cart if the dispatch to external ERP fails.