Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(router): handle redirection to return_url from nested iframe in separate 3ds flow (#4164)

Sai Harsha Vardhanb8c927593a85
diff --git a/crates/router/src/core/payments.rs b/crates/router/src/core/payments.rs
index 569538b5af..0a3a93923b 100644
--- a/crates/router/src/core/payments.rs
+++ b/crates/router/src/core/payments.rs
@@ -1100,7 +1100,7 @@ impl<Ctx: PaymentMethodRetrieve> PaymentRedirectFlow<Ctx> for PaymentAuthenticat
try {{
// if inside iframe, send post message to parent for redirection
if (window.self !== window.parent) {{
- window.parent.postMessage({{openurl: return_url}}, '*')
+ window.top.postMessage({{openurl: return_url}}, '*')
// if parent, redirect self to return_url
}} else {{
window.location.href = return_url