/// export interface CurrentOrderInfo { /** 订单UUID */ uuid?: string; /** 订单ID */ orderId?: string; /** 订单状态 */ status?: string; /** 当前步骤 */ step?: string; /** 订单总金额 */ totalAmount?: string; /** 待付金额 */ remainingAmount?: string; /** 支付状态 */ paymentStatus?: string; /** 是否为定金订单 */ isDeposit?: boolean; /** 定金金额 */ depositAmount?: string; /** 订单类型 */ orderType?: 'virtual' | 'appointment_booking'; /** 平台类型 */ platform?: 'pc' | 'h5'; /** 创建时间 */ createdAt?: string; /** 商品数量 */ itemCount?: number; /** 是否有本地订单数据 */ hasLocalOrderData?: boolean; /** 当前订单客户 ID */ customerId?: string | number; /** 当前订单客户展示名 */ customerName?: string; /** 当前订单客户手机号 */ customerPhone?: string; /** 当前订单客户邮箱 */ customerEmail?: string; /** 当前订单客户 UI 快照 */ customerSnapshot?: any; } export interface PaymentData { orderId?: string | number; totalAmount?: number; currency?: string; customerId?: string | number; customerName?: string; description?: string; items?: PaymentItem[]; } export interface PaymentItem { id: string | number; name: string; quantity: number; price: number; total: number; } export interface ModuleConfig { showWalletPass?: boolean; showCashPayment?: boolean; showAdditionalModule?: boolean; showPaymentOptions?: boolean; } export interface StatusConfig { leftStatus?: string; rightStatus?: string; } export interface PaymentResult { type: 'cash' | 'walletpass' | 'etfpos' | 'custom' | 'mx51'; amount?: number; status: 'success' | 'failed' | 'cancelled' | 'pending'; orderId?: string | number; transactionId?: string; message?: string; timestamp?: number; roundingAmount?: number; } export interface CheckoutCallbacks { onPaymentComplete?: (result: PaymentResult) => void; onPaymentCancel?: () => void; onStatusChange?: (status: string) => void; } export interface PaymentModalPluginCustomerChangePayload { customer: unknown; source: string; orderIdentity?: unknown; } export interface PaymentModalPluginProps { baseSalesModuleName?: string; order?: { id?: string | number; }; order_id?: string | number; orderId?: string | number; paymentResultDisplayMode?: string; config?: any; onCustomerChange?: (payload: PaymentModalPluginCustomerChangePayload) => void; callback?: (result: any) => void; } export interface CheckoutProps { paymentData?: PaymentData; moduleConfig?: ModuleConfig; statusConfig?: StatusConfig; cashAmountButtons?: number[]; onPaymentComplete?: (result: PaymentResult) => void; onPaymentCancel?: () => void; onStatusChange?: (status: string) => void; } export interface StatusSectionProps { config?: StatusConfig; onStatusChange?: (status: string) => void; } export interface AmountSummaryProps { orderInfo?: CurrentOrderInfo; open_deposit?: boolean; customAmount?: string; onAmountChange?: (amount: string) => void; } export interface WalletPassModuleProps { orderInfo?: CurrentOrderInfo; } export interface CashPaymentModuleProps { orderInfo?: CurrentOrderInfo; onPaymentComplete?: (result: PaymentResult) => void; amountButtons?: number[]; } export interface PaymentOptionsModuleProps { orderInfo?: CurrentOrderInfo; onClick?: (method: PaymentMethod) => void; } export interface AdditionalModuleProps { orderInfo?: CurrentOrderInfo; customAmount?: string; handleButtonClick: (key: string) => void; hasOrderNote?: boolean; } export interface PaymentMethod { id: string; name: string; nameEn?: string; surcharge: string; surchargeAmount?: number; icon?: string; iconComponent?: React.ReactNode; color?: string; enabled?: boolean; code: string; type: string; fixed?: number; percentage?: number; totalAmount?: string; } export interface PaymentMethodSelection { method: PaymentMethod; amount: number; totalWithSurcharge: number; }