Canceling the Payment Process
v8
Starting from API V8, it became possible to interrupt the payment / cancellation of an order, as well as the deposit / refund of prepayment.
After payments are made in the payment system (if supported by the payment type), before the start of fiscalization on the fiscal registrar, a notification is triggered in the API
BeforeDoCheque.
Previously, it allowed changing the order through
IOperationService,
available in the notification arguments, for example, adding some external data
(AddOrderExternalData).
It also allowed interaction with the user through
IViewManager,
showing various windows in SyrveFront in case the payment was not performed in the background.
Now, in addition to everything, the ability to cancel the payment process by generating an OperationCanceledException in the corresponding subscriber has been added.
This may be needed in cases where additional conditions are checked,
the failure of which may prevent the closure / cancellation of the order or the deposit / refund of prepayment.
Also, a list of payments on which the operation is currently being performed and for which a receipt should be printed has appeared in the notification arguments.
The notification is generated for both fiscal and non-fiscal payment types.