feat(payment): expand Stripe methods and checkout handoff
Docker Image / Build and Push Docker Image (push) Successful in 2m10s

This commit is contained in:
Codex
2026-07-28 16:27:03 +08:00
parent 2e402de15b
commit 59e4eac736
42 changed files with 1151 additions and 92 deletions
+14 -5
View File
@@ -32,14 +32,18 @@ function initializeCatalogState(
const catalogChanged = planCatalog !== context.planCatalog;
const characterChanged = giftCharacterId !== context.giftCharacterId;
const selectionChanged =
planCatalog === "tip" &&
((event.category ?? null) !== context.selectedGiftCategory ||
(event.planId ?? null) !== (context.selectedPlanId || null));
planCatalog === "tip"
? (event.category ?? null) !== context.selectedGiftCategory ||
(event.planId ?? null) !== (context.selectedPlanId || null)
: (event.planId ?? null) !== (context.selectedPlanId || null);
const commercialOfferId =
planCatalog === "default" ? (event.commercialOfferId ?? null) : null;
const offerChanged = commercialOfferId !== context.commercialOfferId;
const chatActionId = event.chatActionId ?? null;
const chatActionChanged = chatActionId !== context.chatActionId;
const initialAutoRenew =
planCatalog === "tip" ? false : (event.autoRenew ?? true);
const autoRenewChanged = initialAutoRenew !== context.autoRenew;
return {
planCatalog,
@@ -51,7 +55,12 @@ function initializeCatalogState(
planCatalog === "tip" ? (event.category ?? null) : null,
requestedGiftPlanId:
planCatalog === "tip" ? (event.planId ?? null) : null,
...(catalogChanged || characterChanged || selectionChanged || offerChanged || chatActionChanged
...(catalogChanged ||
characterChanged ||
selectionChanged ||
offerChanged ||
chatActionChanged ||
autoRenewChanged
? {
...resetOrderState(),
plans: [],
@@ -62,7 +71,7 @@ function initializeCatalogState(
planCatalog === "default" ? (event.planId ?? "") : "",
isFirstRecharge: false,
commercialOffer: null,
autoRenew: planCatalog !== "tip",
autoRenew: initialAutoRenew,
}
: {}),
};