mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-24 17:51:51 +02:00
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:
committed by
Copybot
parent
3f7e897320
commit
cc87a4ecea
@@ -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 })}
|
||||
|
||||
Reference in New Issue
Block a user