This commit is contained in:
Manav Rathi
2024-11-06 13:24:42 +05:30
parent 4bc8ef6bc9
commit abbc7a5748

View File

@@ -230,10 +230,16 @@ export async function updatePaymentMethod(
}
}
export async function checkSubscriptionPurchase(
setDialogMessage: SetDialogBoxAttributes,
router: NextRouter,
setLoading: SetLoading,
/**
* When the payments app redirects back to us after a plan purchase or update
* completes, it sets various query parameters to relay the status of the action
* back to us.
*
* Check if these query parameters exist, and if so, act on them appropriately.
*/
export async function checkSubscriptionPurchase( setDialogMessage:
SetDialogBoxAttributes, router: NextRouter, setLoading: SetLoading,
) {
const { session_id: sessionId, status, reason } = router.query ?? {};