From cc87a4eceaf7607d730b97027979fffe0416572c Mon Sep 17 00:00:00 2001 From: Alexandre Bourdin Date: Mon, 15 May 2023 18:10:51 +0300 Subject: [PATCH] Merge pull request #13096 from overleaf/ab-disable-paypal-checkout-inr [web] Disable paypal as a payment option when INR is selected GitOrigin-RevId: f12796ac23d0c7dce1a06c12b7c8cef5f7acae6d --- .../components/new/checkout/checkout-panel.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/services/web/frontend/js/features/subscription/components/new/checkout/checkout-panel.tsx b/services/web/frontend/js/features/subscription/components/new/checkout/checkout-panel.tsx index da52df43e5..073831192f 100644 --- a/services/web/frontend/js/features/subscription/components/new/checkout/checkout-panel.tsx +++ b/services/web/frontend/js/features/subscription/components/new/checkout/checkout-panel.tsx @@ -35,6 +35,7 @@ function CheckoutPanel() { const { t } = useTranslation() const { couponError, + currencyCode, planCode, planName, pricingFormState, @@ -214,6 +215,10 @@ function CheckoutPanel() { setCardIsValid(state.valid) }, []) + if (currencyCode === 'INR' && paymentMethod !== 'credit_card') { + setPaymentMethod('credit_card') + } + if (recurlyLoadError) { return ( @@ -321,10 +326,12 @@ function CheckoutPanel() { {couponError} )} - + {currencyCode === 'INR' ? null : ( + + )} {elements.current && (