feat(payment): restore ezpay return orders

This commit is contained in:
2026-06-22 17:29:47 +08:00
parent 890c955712
commit 21b9954351
14 changed files with 1083 additions and 1 deletions
+1
View File
@@ -10,6 +10,7 @@ export type PaymentEvent =
| { type: "PaymentAutoRenewChanged"; autoRenew: boolean }
| { type: "PaymentAgreementChanged"; agreed: boolean }
| { type: "PaymentCreateOrderSubmitted" }
| { type: "PaymentReturned"; orderId: string }
| { type: "PaymentRefreshVipStatus" }
| { type: "PaymentLaunchFailed"; errorMessage: string }
| { type: "PaymentErrorCleared" }
+9
View File
@@ -300,6 +300,15 @@ export const paymentMachine = setup({
},
},
on: {
PaymentReturned: {
target: ".pollingOrder",
actions: assign(({ event }) => ({
currentOrderId: event.orderId,
payParams: null,
orderStatus: "pending",
errorMessage: null,
})),
},
PaymentLaunchFailed: {
target: ".failed",
actions: assign(({ event }) => ({