From 01ef89452d1febcda8ba16377d5b84591bbe6ed4 Mon Sep 17 00:00:00 2001 From: chenhang Date: Mon, 22 Jun 2026 18:09:54 +0800 Subject: [PATCH 1/2] Revert "fix(payment): allow new orders after paid state" This reverts commit c6b65f0b3a373790007536f21afac885b4ae2366. --- src/stores/payment/payment-machine.ts | 31 --------------------------- 1 file changed, 31 deletions(-) diff --git a/src/stores/payment/payment-machine.ts b/src/stores/payment/payment-machine.ts index f7718502..3c6352fb 100644 --- a/src/stores/payment/payment-machine.ts +++ b/src/stores/payment/payment-machine.ts @@ -270,37 +270,6 @@ export const paymentMachine = setup({ paid: { on: { - PaymentPlanSelected: { - target: "ready", - actions: assign(({ event }) => ({ - ...resetOrderState(), - selectedPlanId: event.planId, - autoRenew: defaultAutoRenewForPlan(event.planId), - })), - }, - PaymentPayChannelChanged: { - target: "ready", - actions: assign(({ event }) => ({ - ...resetOrderState(), - payChannel: event.payChannel, - errorMessage: null, - })), - }, - PaymentCreateOrderSubmitted: [ - { - guard: ({ context }) => - context.agreed && context.selectedPlanId.length > 0, - target: "creatingOrder", - actions: assign(resetOrderState), - }, - { - target: "ready", - actions: assign({ - errorMessage: - "Choose a plan and accept the agreement before continuing.", - }), - }, - ], PaymentReset: { target: "ready", actions: assign(resetOrderState), From 0b8bae5e5f74088b644d508877848a95831f88dc Mon Sep 17 00:00:00 2001 From: chenhang Date: Mon, 22 Jun 2026 18:10:27 +0800 Subject: [PATCH 2/2] fix(payment): enable ezpay debug delay outside production --- .../components/subscription-checkout-button.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/subscription/components/subscription-checkout-button.tsx b/src/app/subscription/components/subscription-checkout-button.tsx index a66dd063..0de76b96 100644 --- a/src/app/subscription/components/subscription-checkout-button.tsx +++ b/src/app/subscription/components/subscription-checkout-button.tsx @@ -60,7 +60,7 @@ export function SubscriptionCheckoutButton({ if (paymentUrl) { const isEzpay = isEzpayPayment(payment.payParams); - if (AppEnvUtil.isDevelopment() && isEzpay) { + if (!AppEnvUtil.isProduction() && isEzpay) { if (ezpayRedirectTimeoutRef.current !== null) { window.clearTimeout(ezpayRedirectTimeoutRef.current); } @@ -150,7 +150,7 @@ export function SubscriptionCheckoutButton({ stripeClientSecret !== hiddenStripeClientSecret && !payment.isPaid; const pendingEzpayRedirectOrderId = - AppEnvUtil.isDevelopment() && + !AppEnvUtil.isProduction() && payment.payParams && isEzpayPayment(payment.payParams) && getPaymentUrl(payment.payParams) && @@ -185,7 +185,7 @@ export function SubscriptionCheckoutButton({ {pendingEzpayRedirectOrderId ? (
- Ezpay order created. Redirecting in 3 seconds. + Ezpay order created. Redirecting in 5 seconds. Order No. {pendingEzpayRedirectOrderId}