From 5902ed02b17c3249421ff08e6bd5cdc4d7078732 Mon Sep 17 00:00:00 2001 From: shum Date: Fri, 11 Sep 2026 15:34:35 +0000 Subject: [PATCH] badges: post host return URL to the embedded frame --- website/src/badges.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/src/badges.html b/website/src/badges.html index 7b37080c05..b40be59b1b 100644 --- a/website/src/badges.html +++ b/website/src/badges.html @@ -192,6 +192,9 @@ templateEngineOverride: njk if (e.data.type === "simplex-embed-ready") { post({ type: "simplex-theme", theme: siteTheme() }); postColors(); + // A card confirm redirects the top window to this URL; the frame hands it to Stripe + // so the redirect returns to the site, not to the frame's own standalone page. + post({ type: "simplex-return-url", url: location.origin + location.pathname }); } // The buyer used the theme switch inside the frame; keep the site in step. if (e.data.type === "simplex-theme") { applySiteTheme(e.data.theme); postColors(); }