feat(payment): support user-bound seven-discount offers
Docker Image / Build and Push Docker Image (push) Successful in 1m55s

This commit is contained in:
Codex
2026-07-23 16:11:20 +08:00
parent 02f6964484
commit 4dae805a88
39 changed files with 418 additions and 28 deletions
+5
View File
@@ -22,6 +22,7 @@ export interface UsePaymentRouteFlowInput {
characterId?: string;
initialCategory?: string | null;
initialPlanId?: string | null;
commercialOfferId?: string | null;
}
export interface PaymentRouteFlow {
@@ -41,6 +42,7 @@ export function usePaymentRouteFlow({
characterId,
initialCategory = null,
initialPlanId = null,
commercialOfferId = null,
}: UsePaymentRouteFlowInput): PaymentRouteFlow {
const payment = usePaymentState();
const paymentDispatch = usePaymentDispatch();
@@ -50,6 +52,7 @@ export function usePaymentRouteFlow({
characterId ?? "",
initialCategory ?? "",
initialPlanId ?? "",
commercialOfferId ?? "",
].join(":");
usePendingPaymentOrderLifecycle({
@@ -69,11 +72,13 @@ export function usePaymentRouteFlow({
...(characterId ? { characterId } : {}),
...(initialCategory ? { category: initialCategory } : {}),
...(initialPlanId ? { planId: initialPlanId } : {}),
...(commercialOfferId ? { commercialOfferId } : {}),
});
}, [
catalog,
catalogKey,
characterId,
commercialOfferId,
initialCategory,
initialPlanId,
initialPayChannel,