From 1c4ad7168c567561c5fea126693ccfe0aac8ed40 Mon Sep 17 00:00:00 2001 From: Kashif Date: Mon, 11 Nov 2024 13:06:14 +0530 Subject: [PATCH] refactor: explicitly specify top redirections for secure payment and payout links (#6494) --- .../router/src/core/generic_link/payout_link/initiate/script.js | 1 + .../payment_link_initiate/secure_payment_link_initiator.js | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/router/src/core/generic_link/payout_link/initiate/script.js b/crates/router/src/core/generic_link/payout_link/initiate/script.js index 2d3592256e25..f226a06fa16a 100644 --- a/crates/router/src/core/generic_link/payout_link/initiate/script.js +++ b/crates/router/src/core/generic_link/payout_link/initiate/script.js @@ -144,6 +144,7 @@ if (!isTestMode && !isFramed) { // @ts-ignore hyper = window.Hyper(publishableKey, { isPreloadEnabled: false, + shouldUseTopRedirection: isFramed, }); widgets = hyper.widgets({ appearance: appearance, diff --git a/crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js b/crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js index 48974a564d5e..c901148bbfae 100644 --- a/crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js +++ b/crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js @@ -48,6 +48,7 @@ if (!isFramed) { // @ts-ignore hyper = window.Hyper(pub_key, { isPreloadEnabled: false, + shouldUseTopRedirection: true, }); // @ts-ignore widgets = hyper.widgets({