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