Umbraco commerce 13 payment calculation state

Hi,

we are using Umbraco Commerce and the Mollie payment provider. This is a single payment method, but within mollie there are different issuers (like Ideal, PayPal, CreditCard etc).

We would like to add a surcharge based on the issuer. We got this working by implementing a custom property editor which fetches these issuers and set a value to add. when updating the issuer, we set the payment surcharge as property on the order.

we then overwrite the PaymentCalculatorBase to fetch this property from the order and return it as a price.

This works great for fixed pricing, but we run into an issue when we want this to work based on subtotal pricing.

It seems at the point of payment method price calculation the discounts are not applied yet and so we do not have the right price to calculate the payment fee.

Is this intended behavior, or can we force payment calculation to happen later in the order calculation state so we have the discounted subtotal price?

Or are there any other solutions we can try?

so summary:

Umbraco payment provider: mollie-onetime
payment issuers surcharge example (Ideal: fixed surcharge, PayPal: % surcharge)

Umbraco: 13.6.0
Umbraco Commerce: 13.1.19

Thanks

I’d probably suggest looking at using a PriceAdjuster instead. These are calculated during the discount calculation process to previous discounts should be calculated by then. You could then apply your fee as a shipping price adjustment with a positive value.

this works. Thanks.