payment gateways and plans billing and signup pages refactored

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-07 13:02:53 +00:00
parent ad1756c349
commit ad75fa031e
17 changed files with 4587 additions and 500 deletions

View File

@@ -357,19 +357,10 @@ export const useAuthStore = create<AuthState>()(
throw new Error('Failed to save login session. Please try again.');
}
// Return full response data for success handling (includes checkout_url for payment redirects)
console.log('Extracting checkout_url:', {
'responseData.checkout_url': responseData.checkout_url,
'data.checkout_url': data.checkout_url,
'data.data?.checkout_url': data.data?.checkout_url,
responseData: responseData,
});
// Return full response data for success handling
// Note: checkout_url is no longer returned by backend (payment flow moved to /account/plans)
return {
...userData,
checkout_url: responseData.checkout_url || data.checkout_url || data.data?.checkout_url,
checkout_session_id: responseData.checkout_session_id || data.checkout_session_id || data.data?.checkout_session_id,
paypal_order_id: responseData.paypal_order_id || data.paypal_order_id || data.data?.paypal_order_id,
};
} catch (error: any) {
// ALWAYS reset loading on error - critical to prevent stuck state