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
This commit is contained in:
Alexandre Bourdin
2023-05-15 18:10:51 +03:00
committed by Copybot
parent 3f7e897320
commit cc87a4ecea

View File

@@ -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 (
<Alert bsStyle="danger">
@@ -321,10 +326,12 @@ function CheckoutPanel() {
<strong>{couponError}</strong>
</Alert>
)}
<PaymentMethodToggle
onChange={handlePaymentMethod}
paymentMethod={paymentMethod}
/>
{currencyCode === 'INR' ? null : (
<PaymentMethodToggle
onChange={handlePaymentMethod}
paymentMethod={paymentMethod}
/>
)}
{elements.current && (
<CardElement
className={classnames({ hidden: !isCreditCardPaymentMethod })}