pay
This commit is contained in:
@@ -40,19 +40,9 @@ func (p *PayHandler) CreatePay(order *model.Order, payType int, vendorPayType st
|
||||
var result2 tonglianpayapi.PayInfo
|
||||
json.Unmarshal([]byte(result.PayInfo), &result2)
|
||||
order.PrepayID = result2.Package[strings.LastIndex(result2.Package, "=")+1 : len(result2.Package)]
|
||||
orderPay = &model.OrderPay{
|
||||
PayOrderID: param.Reqsn,
|
||||
PayType: payType,
|
||||
VendorPayType: vendorPayType,
|
||||
TransactionID: result.TrxID,
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
VendorID: order.VendorID,
|
||||
Status: 0,
|
||||
PayCreatedAt: payCreatedAt,
|
||||
PrepayID: prePayID,
|
||||
CodeURL: utils.LimitUTF8StringLen(result.PayInfo, 3200),
|
||||
TotalFee: int(order.ActualPayPrice),
|
||||
}
|
||||
order.TransactionID = result.TrxID
|
||||
order.OriginalData = utils.LimitUTF8StringLen(result.PayInfo, 3200)
|
||||
|
||||
}
|
||||
default:
|
||||
err = fmt.Errorf("支付方式:%d当前不支持", payType)
|
||||
|
||||
@@ -453,7 +453,8 @@ type Order struct {
|
||||
TransactionID string `orm:"column(transaction_id);size(48)" json:"transactionID"` // 支付成功后,支付方生成的事务ID
|
||||
PayFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
|
||||
PrepayID string `orm:"column(prepay_id);size(48)" json:"prepayID"` // 下单后,支付前,支付方生成的事务ID
|
||||
Comment string `orm:"size(255)" json:"comment"` //备注
|
||||
OriginalData string `orm:"type(text)" json:"-"`
|
||||
Comment string `orm:"size(255)" json:"comment"` //备注
|
||||
}
|
||||
|
||||
func (v *Order) TableIndex() [][]string {
|
||||
|
||||
Reference in New Issue
Block a user