fix(subscription): prefer Stripe payment dialog

This commit is contained in:
2026-06-22 14:06:46 +08:00
parent e69ea5e170
commit 375091e828
@@ -36,14 +36,14 @@ export function SubscriptionCheckoutButton({
}
launchedNonceRef.current = payment.launchNonce;
const paymentUrl = getPaymentUrl(payment.payParams);
if (paymentUrl) {
window.location.href = paymentUrl;
const clientSecret = getStripeClientSecret(payment.payParams);
if (clientSecret) {
return;
}
const clientSecret = getStripeClientSecret(payment.payParams);
if (clientSecret) {
const paymentUrl = getPaymentUrl(payment.payParams);
if (paymentUrl) {
window.location.href = paymentUrl;
return;
}