Phase4: Stripe
All checks were successful
Build and Push / build (push) Successful in 1m40s

This commit is contained in:
2026-05-25 00:14:20 +02:00
parent 875ade4351
commit 6a8ad7b4be
5 changed files with 14 additions and 13 deletions

View File

@@ -30,13 +30,14 @@ export function PaymentStatusBanner() {
const params = new URLSearchParams(window.location.search); const params = new URLSearchParams(window.location.search);
if (params.has("paid")) { if (params.has("paid")) {
setState("paid"); setState("paid");
// Reload after 4s so the status badge picks up the webhook's // The webhook usually arrives before the browser redirect
// effect on the invoice row. By then most webhook deliveries // completes, so the page often renders with status='paid'
// have landed; if not the user just sees "open" and can // on first load and this refresh is a no-op. In the rare
// manually refresh. // case where it arrives slightly after, a short refresh
// picks up the status flip. 1.5s is comfortable for both.
const timer = setTimeout(() => { const timer = setTimeout(() => {
router.refresh(); router.refresh();
}, 4000); }, 1500);
// Strip the query string out of the URL. // Strip the query string out of the URL.
const cleanUrl = window.location.pathname; const cleanUrl = window.location.pathname;
window.history.replaceState({}, "", cleanUrl); window.history.replaceState({}, "", cleanUrl);

View File

@@ -740,7 +740,7 @@
}, },
"payWithCard": "Mit Karte bezahlen", "payWithCard": "Mit Karte bezahlen",
"redirectingToStripe": "Weiterleitung…", "redirectingToStripe": "Weiterleitung…",
"paymentReceived": "Zahlung erhalten — vielen Dank. Der Status wird aktualisiert, sobald Stripe bestätigt (wenige Sekunden).", "paymentReceived": "Zahlung erhalten — vielen Dank!",
"paymentCancelled": "Zahlung wurde abgebrochen. Die Rechnung ist weiterhin offen; Sie können es jederzeit erneut versuchen." "paymentCancelled": "Zahlung abgebrochen."
} }
} }

View File

@@ -740,7 +740,7 @@
}, },
"payWithCard": "Pay with card", "payWithCard": "Pay with card",
"redirectingToStripe": "Redirecting…", "redirectingToStripe": "Redirecting…",
"paymentReceived": "Payment received — thank you. The status will update once Stripe confirms (a few seconds).", "paymentReceived": "Payment received — thank you!",
"paymentCancelled": "Payment was cancelled. The invoice is still open; you can try again whenever." "paymentCancelled": "Payment cancelled."
} }
} }

View File

@@ -740,7 +740,7 @@
}, },
"payWithCard": "Payer par carte", "payWithCard": "Payer par carte",
"redirectingToStripe": "Redirection…", "redirectingToStripe": "Redirection…",
"paymentReceived": "Paiement reçu — merci. Le statut sera mis à jour dès la confirmation de Stripe (quelques secondes).", "paymentReceived": "Paiement reçu — merci !",
"paymentCancelled": "Le paiement a été annulé. La facture reste ouverte ; vous pouvez réessayer à tout moment." "paymentCancelled": "Paiement annulé."
} }
} }

View File

@@ -740,7 +740,7 @@
}, },
"payWithCard": "Paga con carta", "payWithCard": "Paga con carta",
"redirectingToStripe": "Reindirizzamento…", "redirectingToStripe": "Reindirizzamento…",
"paymentReceived": "Pagamento ricevuto — grazie. Lo stato si aggiornerà alla conferma di Stripe (pochi secondi).", "paymentReceived": "Pagamento ricevuto — grazie!",
"paymentCancelled": "Il pagamento è stato annullato. La fattura rimane aperta; puoi riprovare in qualsiasi momento." "paymentCancelled": "Pagamento annullato."
} }
} }