How to invoke a script when a sales order is rejected?
When a customer creates a Sales Order but the it gets cancelled because the information they provided about their card was not accurate. This causes a Sales Order to get an “Error: Payment has been rejected”.
I tried logging the context type but it only return “create”. If I cancel the Sales Order from the Web or NetSuite the context type will return “cancel”.
How do I invoke the script to run when a Sales Order is cancel from the payment error?