From 01695609bb4a6197f5a6b533dd5916ce9aa2e1d7 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 11 Jul 2026 13:14:38 +0000 Subject: [PATCH] Changes Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com> --- src/components/PlansSection.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/PlansSection.tsx b/src/components/PlansSection.tsx index 3432392..dd1ad13 100644 --- a/src/components/PlansSection.tsx +++ b/src/components/PlansSection.tsx @@ -122,7 +122,7 @@ const PlansSection = () => { postal_code: result.data.postnummer, city: "Storstockholm", comments: result.data.kommentarer ?? "", - return_url: `${window.location.origin}/?checkout=success&session_id={CHECKOUT_SESSION_ID}`, + return_url: `${window.location.origin}/order-confirmation?session_id={CHECKOUT_SESSION_ID}&method=card&kg=${recommendedKg}&email=${encodeURIComponent(result.data.epost)}`, environment: getStripeEnvironment(), }; @@ -134,7 +134,8 @@ const PlansSection = () => { if (!(data as any)?.clientSecret) throw new Error("Kunde inte skapa checkout-session"); setClientSecret((data as any).clientSecret); } else { - setSubmitted("invoice"); + window.location.href = `/order-confirmation?method=invoice&kg=${recommendedKg}&email=${encodeURIComponent(result.data.epost)}`; + return; } } catch (err: any) { console.error(err);