/** * 充值相关类型定义 */ /** * 创建充值订单请求参数 */ export interface CreateRechargePaymentDto { /** 用户ID */ userId?: string /** 客户编码(充值对象) */ customerSn?: string /** 充值金额 */ amount?: number /** 赠送金额 */ giftAmount?: number /** 充值类型 */ rcgType?: number /** 交易类型:1-JSAPI/小程序 */ tradeType?: number /** 店铺编码 */ bpSn?: string /** 机构编码 */ instSn?: string /** OpenId(微信支付必传) */ openId?: string /** 支付标题 */ subject?: string /** 支付描述 */ body?: string } /** * 创建充值订单响应(data 字段内容) */ export interface RechargePaymentResponseDto { /** 商户订单号 */ outTradeNo: string /** 支付渠道:1-微信、2-支付宝等 */ channel: number /** 调起微信支付所需参数 */ payParameters: RechargeWechatPayParameters | null /** 支付链接(Native扫码支付用) */ payUrl: string } /** * 微信支付参数(充值场景) */ export interface RechargeWechatPayParameters { timeStamp: string nonceStr: string package: string signType: string paySign: string } /** * 查询支付状态的支付渠道枚举 */ export type PaymentChannel = 'WechatPay' | 'Alipay' | 'UnionPay' | 'Balance' | 'BankCard'