From 5875acaf6bddc134b991b3b9876e03ee7b370266 Mon Sep 17 00:00:00 2001 From: Can Demiralp Date: Fri, 2 Aug 2024 16:08:56 +0300 Subject: [PATCH] [ECP-9382-v3] Include holderName in recurring payment requests (#527) * [ECP-9382-v3] Add holderName to OneClick payment requests * [ECP-9382-v3] Make cardholder name required --------- Co-authored-by: Can Demiralp --- .../app/storefront/src/checkout/confirm-order.plugin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Resources/app/storefront/src/checkout/confirm-order.plugin.js b/src/Resources/app/storefront/src/checkout/confirm-order.plugin.js index 2d713f93..023f06b0 100644 --- a/src/Resources/app/storefront/src/checkout/confirm-order.plugin.js +++ b/src/Resources/app/storefront/src/checkout/confirm-order.plugin.js @@ -93,6 +93,7 @@ export default class ConfirmOrderPlugin extends Plugin { paymentMethodsConfiguration: { card: { hasHolderName: true, + holderNameRequired: true, clickToPayConfiguration: { merchantDisplayName: merchantAccount, shopperEmail: shopperDetails.shopperEmail @@ -521,6 +522,10 @@ export default class ConfirmOrderPlugin extends Plugin { }, onSubmit: function(state, component) { if (state.isValid) { + if (isOneClick) { + state.data.paymentMethod.holderName = paymentMethod.holderName ?? ''; + } + let extraParams = { stateData: JSON.stringify(state.data) };