refactor: update credit checkout session callback param name
This commit is contained in:
parent
1adf3d5dc3
commit
49b39ad9dd
@ -90,7 +90,7 @@ export const createCreditCheckoutSession = actionClient
|
||||
|
||||
// Create checkout session with credit-specific URLs
|
||||
const successUrl = getUrlWithLocale(
|
||||
`${Routes.SettingsBilling}?session_id={CHECKOUT_SESSION_ID}`,
|
||||
`${Routes.SettingsBilling}?credits_session_id={CHECKOUT_SESSION_ID}`,
|
||||
locale
|
||||
);
|
||||
const cancelUrl = getUrlWithLocale(Routes.SettingsBilling, locale);
|
||||
|
@ -82,7 +82,7 @@ export default function CreditsBalanceCard() {
|
||||
|
||||
// Check for payment success and show success message
|
||||
useEffect(() => {
|
||||
const sessionId = searchParams.get('session_id');
|
||||
const sessionId = searchParams.get('credits_session_id');
|
||||
if (sessionId && !hasHandledSession.current) {
|
||||
hasHandledSession.current = true;
|
||||
|
||||
@ -98,7 +98,7 @@ export default function CreditsBalanceCard() {
|
||||
|
||||
// Clean up URL parameters
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.delete('session_id');
|
||||
url.searchParams.delete('credits_session_id');
|
||||
localeRouter.replace(Routes.SettingsBilling + url.search);
|
||||
}
|
||||
}, [searchParams, localeRouter, fetchCredits, fetchCreditStats, t]);
|
||||
|
Loading…
Reference in New Issue
Block a user