Notifications about Deleting External Payment from Order Added to API V8

Tags: v8

When attempting to delete an external payment, the method OnPaymentDeleting of the corresponding IPaymentProcessor is called.

Some payment systems require processing the payment in an external system before paying for the order in Syrve, which creates a time gap when the payment has already been processed in the external system, but not yet in Syrve. Previously, a user could delete such a payment without any trace, and since this payment was considered unprocessed in Syrve, it was deleted without cancellation, leading to erroneous extra transactions in the external system.

Now, the payment processor in the OnPaymentDeleting method can, at its discretion:

Currently, this only works in the case of attempting to delete from the payment screen. The call to the OnPaymentDeleting method when deleting a payment via the API (DeleteExternalPaymentItem) will be implemented later.