通联宝支付

This commit is contained in:
苏尹岚
2020-03-02 11:00:17 +08:00
parent f7496e89a3
commit ad74b03c74

View File

@@ -38,7 +38,7 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
PayOrderID: param.Reqsn,
PayType: model.PayTypeTL,
VendorPayType: vendorPayType,
TransactionID: result.TrxID,
VendorOrderID: order.VendorOrderID,
VendorID: order.VendorID,
Status: 0,
@@ -71,7 +71,7 @@ func onTLpayFinished(call *tonglianpayapi.CallBackResult) (err error) {
db := dao.GetDB()
if err = dao.GetEntity(db, orderPay, "PayOrderID", "PayType", "DeletedAt"); err == nil {
orderPay.PayFinishedAt = utils.Time2Pointer(utils.Str2Time(call.PayTime))
orderPay.TransactionID = call.ChnlTrxID
// orderPay.TransactionID = call.ChnlTrxID
orderPay.OriginalData = utils.Format4Output(call, true)
if call.TrxStatus == tonglianpayapi.TrxStatusSuccess {
orderPay.Status = model.PayStatusYes
@@ -121,10 +121,11 @@ func onTLpayRefund(call *tonglianpayapi.CallBackResult) (err error) {
func refundOrderByTL(ctx *jxcontext.Context, orderPay *model.OrderPay, refundID string, refundFee int, refundDesc string) (orderPayRefund *model.OrderPayRefund, err error) {
result, err := api.TLpayAPI.PayRefund(&tonglianpayapi.PayRefundParam{
Trxamt: orderPay.TotalFee,
Reqsn: refundID,
OldReqsn: orderPay.VendorOrderID,
Trxamt: orderPay.TotalFee,
Reqsn: utils.GetUUID(),
// OldReqsn: orderPay.VendorOrderID,
Remark: refundDesc,
OldTrxID: orderPay.TransactionID,
})
if err == nil {
orderPayRefund = &model.OrderPayRefund{