Payment method calculators (extra fees per payment method)
See original GitHub issueIs your feature request related to a problem? Please describe. I would like to be able to add extra collection fee for “Payment” that would be listed in Order (for invoicing) and eligiblePaymentMethods payload.
Describe the solution you’d like
Extending the payment handler with paymentCalculators that would allow calculate and add extra fees per payment method based on order contents and shipping methods. This paymentCalculator should also hold “name” of that fee.
When user selects an payment that has a “price” (e.g. collection fee for “cash-on-delivery”, additional fee for more expensive payment service e.g. paypay…) this price would be added to array of paymentFees: {total: number, name: string}[]
to the order so it can be listed and present in order confirmation and usable for invoicing.
Any calculated fees by the paymentCalculators should also be present in payload when using new “eligiblePaymentMethods” call:
New eligiblePaymentMethods method + checking methods to payment handlers #469
Describe alternatives you’ve considered Incresing of the total amount of order by the collection fee - this results in confusion and “hidden” addition to the order.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top GitHub Comments
The solution you describe would be also handy for the other direction - to be able to easily apply general discounts that are not “promotions” (e.g. after personal communication between seller and customer, the seller would be able to apply discount to order via admin ui).
I’ve been thinking about a more general solution that would cover this - the idea of “surcharges”. These are non-SKU costs that might be added to an order and need to be itemized - extra payment fees being a good example. Other examples:
Implementation-wise, these could use the existing “Adjustments” concept to store the data, which allow an amount and a description to be stored for each adjustment.