f
This commit is contained in:
28
internal/domains/finance/entities/alipay_order.go
Normal file
28
internal/domains/finance/entities/alipay_order.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package entities
|
||||
|
||||
import "github.com/shopspring/decimal"
|
||||
|
||||
// AlipayOrderStatus 支付宝订单状态枚举(别名)
|
||||
type AlipayOrderStatus = PayOrderStatus
|
||||
|
||||
const (
|
||||
AlipayOrderStatusPending AlipayOrderStatus = PayOrderStatusPending // 待支付
|
||||
AlipayOrderStatusSuccess AlipayOrderStatus = PayOrderStatusSuccess // 支付成功
|
||||
AlipayOrderStatusFailed AlipayOrderStatus = PayOrderStatusFailed // 支付失败
|
||||
AlipayOrderStatusCancelled AlipayOrderStatus = PayOrderStatusCancelled // 已取消
|
||||
AlipayOrderStatusClosed AlipayOrderStatus = PayOrderStatusClosed // 已关闭
|
||||
)
|
||||
|
||||
const (
|
||||
AlipayOrderPlatformApp = "app" // 支付宝APP支付
|
||||
AlipayOrderPlatformH5 = "h5" // 支付宝H5支付
|
||||
AlipayOrderPlatformPC = "pc" // 支付宝PC支付
|
||||
)
|
||||
|
||||
// AlipayOrder 支付宝订单实体(统一表 typay_orders,兼容多支付渠道)
|
||||
type AlipayOrder = PayOrder
|
||||
|
||||
// NewAlipayOrder 工厂方法 - 创建支付宝订单
|
||||
func NewAlipayOrder(rechargeID, outTradeNo, subject string, amount decimal.Decimal, platform string) *AlipayOrder {
|
||||
return NewPayOrder(rechargeID, outTradeNo, subject, amount, platform, "alipay")
|
||||
}
|
||||
Reference in New Issue
Block a user