Merge pull request #27093 from overleaf/ls-support-3ds-in-group-plan-update-flows

Support 3DS verification in group plan update flows

GitOrigin-RevId: 3206f612e5699f39ac44864daf6610da2956e6ca
This commit is contained in:
Liangjun Song
2025-07-16 08:05:25 +00:00
committed by Copybot
parent 9e22ed9c3f
commit 1daa49d9d2
5 changed files with 152 additions and 33 deletions
@@ -2,7 +2,10 @@ import { useEffect, useState } from 'react'
import { useTranslation, Trans } from 'react-i18next'
import { PaidSubscription } from '../../../../../../../../../../types/subscription/dashboard/subscription'
import { PriceForDisplayData } from '../../../../../../../../../../types/subscription/plan'
import { postJSON } from '../../../../../../../../infrastructure/fetch-json'
import {
postJSON,
FetchError,
} from '../../../../../../../../infrastructure/fetch-json'
import getMeta from '../../../../../../../../utils/meta'
import { useSubscriptionDashboardContext } from '../../../../../../context/subscription-dashboard-context'
import GenericErrorAlert from '../../../../generic-error-alert'
@@ -23,6 +26,7 @@ import { useContactUsModal } from '@/shared/hooks/use-contact-us-modal'
import { UserProvider } from '@/shared/context/user-context'
import OLButton from '@/features/ui/components/ol/ol-button'
import OLNotification from '@/features/ui/components/ol/ol-notification'
import handleStripePaymentAction from '@/features/subscription/util/handle-stripe-payment-action'
const educationalPercentDiscount = 40
@@ -136,6 +140,11 @@ export function ChangeToGroupModal() {
})
location.reload()
} catch (e) {
const { handled } = await handleStripePaymentAction(e as FetchError)
if (handled) {
location.reload()
return
}
setError(true)
setInflight(false)
}