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
|
var result2 tonglianpayapi.PayInfo
|
||||||
json.Unmarshal([]byte(result.PayInfo), &result2)
|
json.Unmarshal([]byte(result.PayInfo), &result2)
|
||||||
order.PrepayID = result2.Package[strings.LastIndex(result2.Package, "=")+1 : len(result2.Package)]
|
order.PrepayID = result2.Package[strings.LastIndex(result2.Package, "=")+1 : len(result2.Package)]
|
||||||
orderPay = &model.OrderPay{
|
order.TransactionID = result.TrxID
|
||||||
PayOrderID: param.Reqsn,
|
order.OriginalData = utils.LimitUTF8StringLen(result.PayInfo, 3200)
|
||||||
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),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("支付方式:%d当前不支持", payType)
|
err = fmt.Errorf("支付方式:%d当前不支持", payType)
|
||||||
|
|||||||
@@ -453,7 +453,8 @@ type Order struct {
|
|||||||
TransactionID string `orm:"column(transaction_id);size(48)" json:"transactionID"` // 支付成功后,支付方生成的事务ID
|
TransactionID string `orm:"column(transaction_id);size(48)" json:"transactionID"` // 支付成功后,支付方生成的事务ID
|
||||||
PayFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
|
PayFinishedAt *time.Time `orm:"type(datetime);null" json:"payFinishedAt"`
|
||||||
PrepayID string `orm:"column(prepay_id);size(48)" json:"prepayID"` // 下单后,支付前,支付方生成的事务ID
|
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 {
|
func (v *Order) TableIndex() [][]string {
|
||||||
|
|||||||
Reference in New Issue
Block a user