The OnPaymentAdded handler will be called after adding a discount tied to the payment type
Tags:
Starting from SyrveRms 7.1.4, the handler IExternalPaymentProcessor.OnPaymentAdded will see the order considering the discount tied to the payment type.
Previously, when adding an external payment to the order, the OnPaymentAdded handler was called first, and only then the discount tied to that payment type was added to the order. With this approach, the external payment processor had no way to account for this discount. Starting from SyrveRms 7.1.4, the discount will be added to the order before the OnPaymentAdded call, accordingly, by the time OnPaymentAdded is called, the order amount (IOrder.ResultSum) will already reflect the discount.
This change will affect all supported API versions.