diff --git a/addons/payment/views/payment_templates.xml b/addons/payment/views/payment_templates.xml
index ff1eb0ac0d4..51fe29def9e 100644
--- a/addons/payment/views/payment_templates.xml
+++ b/addons/payment/views/payment_templates.xml
@@ -121,6 +121,13 @@
+
+
+ +
+ Fees
+
Unpublished
diff --git a/addons/website_payment/static/src/js/website_payment_form.js b/addons/website_payment/static/src/js/website_payment_form.js
index 16cb3746100..18f129aad78 100644
--- a/addons/website_payment/static/src/js/website_payment_form.js
+++ b/addons/website_payment/static/src/js/website_payment_form.js
@@ -140,11 +140,14 @@ checkoutForm.include({
}).then(feesPerProvider => {
for (const card of this.$('.o_payment_option_card:has(.o_payment_fee)')) {
const radio = $(card).find('input[name="o_payment_radio"]');
+ let providerId;
if (radio.data("paymentOptionType") === 'provider') {
- const providerId = radio.data("paymentOptionId");
- const chunk = $(card).find('.o_payment_fee .oe_currency_value')[0];
- chunk.innerText = (feesPerProvider[providerId] || 0).toFixed(2);
+ providerId = radio.data("paymentOptionId");
+ } else { // token
+ providerId = radio.data("paymentProviderId");
}
+ const chunk = $(card).find('.o_payment_fee .oe_currency_value')[0];
+ chunk.innerText = (feesPerProvider[providerId] || 0).toFixed(2);
}
}).guardedCatch(error => {
error.event.preventDefault();
diff --git a/addons/website_payment/views/donation_templates.xml b/addons/website_payment/views/donation_templates.xml
index 42c9bafb642..1c8e3bd6b7f 100644
--- a/addons/website_payment/views/donation_templates.xml
+++ b/addons/website_payment/views/donation_templates.xml
@@ -90,6 +90,13 @@
+
+
+
+
+
+ token.provider_id.id
+