From 1c6de3239de71084dace1313b1771a41d41ac6e7 Mon Sep 17 00:00:00 2001 From: Chikke Srujan Date: Thu, 28 Nov 2024 22:12:49 +0530 Subject: [PATCH] add support for hideCardNicknameField for open payment lins --- .../payment_link_initiate/payment_link_initiator.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js b/crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js index 1264915592d6..9e56fe81b4b3 100644 --- a/crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js +++ b/crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js @@ -39,7 +39,7 @@ function initializeSDK() { paymentDetails.sdk_layout === "accordion" ? "accordion" : paymentDetails.sdk_layout; - + var hideCardNicknameField = paymentDetails.hide_card_nickname_field; var unifiedCheckoutOptions = { displaySavedPaymentMethodsCheckbox: false, displaySavedPaymentMethods: false, @@ -56,7 +56,7 @@ function initializeSDK() { height: 55, }, }, - hideCardNicknameField: false, + hideCardNicknameField: hideCardNicknameField, }; // @ts-ignore unifiedCheckout = widgets.create("payment", unifiedCheckoutOptions); @@ -82,5 +82,10 @@ function redirectToStatus() { arr.splice(0, 2); arr.unshift("status"); arr.unshift("payment_link"); - window.location.href = window.location.origin + "/" + arr.join("/") + "?locale=" + paymentDetails.locale; + window.location.href = + window.location.origin + + "/" + + arr.join("/") + + "?locale=" + + paymentDetails.locale; }