fix(payment): support updated plan pricing fields

This commit is contained in:
2026-06-23 15:47:09 +08:00
parent c5eca65303
commit 24e52d6ead
3 changed files with 20 additions and 5 deletions
+2
View File
@@ -12,6 +12,8 @@ export class PaymentPlan {
declare readonly planName: string;
declare readonly orderType: string;
declare readonly amountCents: number;
declare readonly originalAmountCents: number | null;
declare readonly dailyPriceCents: number | null;
declare readonly currency: string;
declare readonly vipDays: number | null;
declare readonly dolAmount: number | null;
+6
View File
@@ -8,6 +8,8 @@ const PaymentPlanWireSchema = z.object({
plan_name: z.string(),
order_type: z.string(),
amount_cents: z.number(),
original_amount_cents: z.number().nullable().default(null),
daily_price_cents: z.number().nullable().default(null),
currency: z.string(),
vip_days: z.number().nullable(),
dol_amount: z.number().nullable(),
@@ -23,6 +25,8 @@ export const PaymentPlanSchema = z
plan_name: data.planName,
order_type: data.orderType,
amount_cents: data.amountCents,
original_amount_cents: data.originalAmountCents,
daily_price_cents: data.dailyPriceCents,
currency: data.currency,
vip_days: data.vipDays,
dol_amount: data.dolAmount,
@@ -35,6 +39,8 @@ export const PaymentPlanSchema = z
planName: data.plan_name,
orderType: data.order_type,
amountCents: data.amount_cents,
originalAmountCents: data.original_amount_cents,
dailyPriceCents: data.daily_price_cents,
currency: data.currency,
vipDays: data.vip_days,
dolAmount: data.dol_amount,