hn-hlw-service/hlw/trade/document.ts
2026-07-27 11:28:33 +08:00

41 lines
1.2 KiB
TypeScript

enum tradeStatus {
'unpay' = 'unpay',
'paid' = 'paid',
'refunding' = 'refunding',
'partialRefunded' = 'partialRefunded', // 部分退费
'refunded' = 'refunded',
'closed' = 'closed', // 未支付关闭账单 (主动取消 或者超时自动取消)
'abnormal' = 'abnormal'
}
enum tradePlatform {
'alipay' = 'alipay',
'unionPay' = 'unionPay',
}
enum tradeBusinessType {
'onlineMedicinePurchase' = 'onlineMedicinePurchase', //线上购药
'medicalWinePurchase' = 'medicalWinePurchase', //浸酒购买
}
interface Trade {
outTradeNo: string; // 商户订单号
tradeNo: string; // 支付宝交易号
tradeStatus: tradeStatus; // 交易状态
totalAmount: number; // 订单总金额
businessNo: string; // 业务单号
businessType: tradeBusinessType; // 业务类型
platform: tradePlatform; // 平台
notifyUrl: string; // 通知URL
appid: string // 平台的appid
desc: string // 订单描述
openId: string // 用户openId (支付宝小程序userId)
expireTime: number // 订单过期时间
createTime: number // 订单创建时间
updateTime: number // 订单更新时间
payTime?: Date // 支付时间
refundApplyTime?: number // 退款申请时间
refundTime?: number // 退款时间
refundReason: '',//退款
}