Skip to content

Commit

Permalink
fix(router): handle redirection to return_url from nested iframe in s…
Browse files Browse the repository at this point in the history
…eparate 3ds flow (#4164)
  • Loading branch information
sai-harsha-vardhan authored Mar 21, 2024
1 parent a151485 commit b8c9275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/router/src/core/payments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8c9275

Please sign in to comment.