From 375091e8282138c705a2c91d85f6b1d2b45969be Mon Sep 17 00:00:00 2001 From: chenhang Date: Mon, 22 Jun 2026 14:06:46 +0800 Subject: [PATCH] fix(subscription): prefer Stripe payment dialog --- .../components/subscription-checkout-button.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/subscription/components/subscription-checkout-button.tsx b/src/app/subscription/components/subscription-checkout-button.tsx index c8c85a29..3b51b0fb 100644 --- a/src/app/subscription/components/subscription-checkout-button.tsx +++ b/src/app/subscription/components/subscription-checkout-button.tsx @@ -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; }