This commit is contained in:
suyl
2021-07-23 14:11:59 +08:00
parent 215bf52530
commit 5d6e5582aa
16 changed files with 166 additions and 24 deletions

View File

@@ -41,6 +41,14 @@ const (
OrderOriginWxMini = "weixinmini"
OrderOriginOpenAPI = "openAPI"
OrderStatusWaitPay = 0 //待支付
OrderStatusPaid = 1 //已支付
OrderStatusPayFail = 2
OrderStatusPayCancel = 3
OrderStatusRefund = 4
PayTypeTL = "tl" //通联支付
)
const (
@@ -64,7 +72,7 @@ type TokenInfo struct {
type FlowConfig struct {
ID int `json:"id"`
Price int `json:"price"`
Price int64 `json:"price"`
Flow float64 `json:"flow"`
Unit string `json:"unit"`
}
@@ -207,7 +215,7 @@ type PayOrder struct {
OrderType string `json:"order_type" db:"order_type"` //订单类型,流量充值等
Origin string `json:"origin"` //订单来源,小程序,开放后台
Status int `json:"status"` //订单状态,待支付2已支付5支付成功110支付失败115
PayPrice int `json:"pay_price" db:"pay_price"` //支付金额
PayPrice int64 `json:"pay_price" db:"pay_price"` //支付金额
TransactionID string `json:"transaction_id" db:"transaction_id"` // 支付成功后支付方生成的事务ID
PayFinishedAt *time.Time `json:"pay_finished_at" db:"pay_finished_at"`
PrepayID string `json:"prepay_id" db:"prepay_id"` // 下单后支付前支付方生成的事务ID