通联宝支付
This commit is contained in:
@@ -38,7 +38,7 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
|||||||
PayOrderID: param.Reqsn,
|
PayOrderID: param.Reqsn,
|
||||||
PayType: model.PayTypeTL,
|
PayType: model.PayTypeTL,
|
||||||
VendorPayType: vendorPayType,
|
VendorPayType: vendorPayType,
|
||||||
|
TransactionID: result.TrxID,
|
||||||
VendorOrderID: order.VendorOrderID,
|
VendorOrderID: order.VendorOrderID,
|
||||||
VendorID: order.VendorID,
|
VendorID: order.VendorID,
|
||||||
Status: 0,
|
Status: 0,
|
||||||
@@ -71,7 +71,7 @@ func onTLpayFinished(call *tonglianpayapi.CallBackResult) (err error) {
|
|||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
if err = dao.GetEntity(db, orderPay, "PayOrderID", "PayType", "DeletedAt"); err == nil {
|
if err = dao.GetEntity(db, orderPay, "PayOrderID", "PayType", "DeletedAt"); err == nil {
|
||||||
orderPay.PayFinishedAt = utils.Time2Pointer(utils.Str2Time(call.PayTime))
|
orderPay.PayFinishedAt = utils.Time2Pointer(utils.Str2Time(call.PayTime))
|
||||||
orderPay.TransactionID = call.ChnlTrxID
|
// orderPay.TransactionID = call.ChnlTrxID
|
||||||
orderPay.OriginalData = utils.Format4Output(call, true)
|
orderPay.OriginalData = utils.Format4Output(call, true)
|
||||||
if call.TrxStatus == tonglianpayapi.TrxStatusSuccess {
|
if call.TrxStatus == tonglianpayapi.TrxStatusSuccess {
|
||||||
orderPay.Status = model.PayStatusYes
|
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) {
|
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{
|
result, err := api.TLpayAPI.PayRefund(&tonglianpayapi.PayRefundParam{
|
||||||
Trxamt: orderPay.TotalFee,
|
Trxamt: orderPay.TotalFee,
|
||||||
Reqsn: refundID,
|
Reqsn: utils.GetUUID(),
|
||||||
OldReqsn: orderPay.VendorOrderID,
|
// OldReqsn: orderPay.VendorOrderID,
|
||||||
Remark: refundDesc,
|
Remark: refundDesc,
|
||||||
|
OldTrxID: orderPay.TransactionID,
|
||||||
})
|
})
|
||||||
if err == nil {
|
if err == nil {
|
||||||
orderPayRefund = &model.OrderPayRefund{
|
orderPayRefund = &model.OrderPayRefund{
|
||||||
|
|||||||
Reference in New Issue
Block a user