feat(payment): connect payment service flow

This commit is contained in:
2026-06-18 15:40:59 +08:00
parent 35c30ac31e
commit a347b39001
34 changed files with 759 additions and 889 deletions
+16
View File
@@ -0,0 +1,16 @@
/**
* Payment 状态机:事件联合
*/
import type { PayChannel } from "@/data/dto/payment";
export type PaymentEvent =
| { type: "PaymentInit" }
| { type: "PaymentPlanSelected"; planId: string }
| { type: "PaymentPayChannelChanged"; payChannel: PayChannel }
| { type: "PaymentAutoRenewChanged"; autoRenew: boolean }
| { type: "PaymentAgreementChanged"; agreed: boolean }
| { type: "PaymentCreateOrderSubmitted" }
| { type: "PaymentRefreshVipStatus" }
| { type: "PaymentLaunchFailed"; errorMessage: string }
| { type: "PaymentErrorCleared" }
| { type: "PaymentReset" };