Add PayPal checkout provider

This commit is contained in:
Codex Agent
2026-02-04 12:18:14 +01:00
parent 56a39d0535
commit fc5dfb272c
33 changed files with 1586 additions and 571 deletions

View File

@@ -1,6 +1,7 @@
export type PendingCheckout = {
packageId: number | null;
checkoutSessionId?: string | null;
orderId?: string | null;
startedAt: number;
};
@@ -36,12 +37,14 @@ export function loadPendingCheckout(
? parsed.packageId
: null;
const checkoutSessionId = typeof parsed.checkoutSessionId === 'string' ? parsed.checkoutSessionId : null;
const orderId = typeof parsed.orderId === 'string' ? parsed.orderId : null;
if (now - parsed.startedAt > ttl) {
return null;
}
return {
packageId,
checkoutSessionId,
orderId,
startedAt: parsed.startedAt,
};
} catch {