Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a8ad7b4be |
@@ -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);
|
||||
|
||||
@@ -740,7 +740,7 @@
|
||||
},
|
||||
"payWithCard": "Mit Karte bezahlen",
|
||||
"redirectingToStripe": "Weiterleitung…",
|
||||
"paymentReceived": "Zahlung erhalten — vielen Dank. Der Status wird aktualisiert, sobald Stripe bestätigt (wenige Sekunden).",
|
||||
"paymentCancelled": "Zahlung wurde abgebrochen. Die Rechnung ist weiterhin offen; Sie können es jederzeit erneut versuchen."
|
||||
"paymentReceived": "Zahlung erhalten — vielen Dank!",
|
||||
"paymentCancelled": "Zahlung abgebrochen."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@
|
||||
},
|
||||
"payWithCard": "Pay with card",
|
||||
"redirectingToStripe": "Redirecting…",
|
||||
"paymentReceived": "Payment received — thank you. The status will update once Stripe confirms (a few seconds).",
|
||||
"paymentCancelled": "Payment was cancelled. The invoice is still open; you can try again whenever."
|
||||
"paymentReceived": "Payment received — thank you!",
|
||||
"paymentCancelled": "Payment cancelled."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@
|
||||
},
|
||||
"payWithCard": "Payer par carte",
|
||||
"redirectingToStripe": "Redirection…",
|
||||
"paymentReceived": "Paiement reçu — merci. Le statut sera mis à jour dès la confirmation de Stripe (quelques secondes).",
|
||||
"paymentCancelled": "Le paiement a été annulé. La facture reste ouverte ; vous pouvez réessayer à tout moment."
|
||||
"paymentReceived": "Paiement reçu — merci !",
|
||||
"paymentCancelled": "Paiement annulé."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@
|
||||
},
|
||||
"payWithCard": "Paga con carta",
|
||||
"redirectingToStripe": "Reindirizzamento…",
|
||||
"paymentReceived": "Pagamento ricevuto — grazie. Lo stato si aggiornerà alla conferma di Stripe (pochi secondi).",
|
||||
"paymentCancelled": "Il pagamento è stato annullato. La fattura rimane aperta; puoi riprovare in qualsiasi momento."
|
||||
"paymentReceived": "Pagamento ricevuto — grazie!",
|
||||
"paymentCancelled": "Pagamento annullato."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user