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; }