feat(payment): restore ezpay return orders
This commit is contained in:
@@ -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" }
|
||||
|
||||
@@ -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 }) => ({
|
||||
|
||||
Reference in New Issue
Block a user