京西商城售后单
This commit is contained in:
@@ -1024,7 +1024,7 @@ func CancelOrder(ctx *jxcontext.Context, order *model.GoodsOrder, reason string)
|
||||
errList.AddErr(err)
|
||||
}
|
||||
} else if orderPay.PayType == model.PayTypeTL {
|
||||
orderPayRefund, err = refundOrderByTL(ctx, orderPay, refundID, orderPay.TotalFee, reason)
|
||||
orderPayRefund, err = RefundOrderByTL(ctx, orderPay, refundID, orderPay.TotalFee, reason)
|
||||
if err != nil {
|
||||
errList.AddErr(err)
|
||||
}
|
||||
|
||||
@@ -147,11 +147,10 @@ func onTLpayRefund(call *tonglianpayapi.CallBackResult) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
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{
|
||||
Trxamt: orderPay.TotalFee,
|
||||
Reqsn: utils.GetUUID(),
|
||||
// OldReqsn: orderPay.VendorOrderID,
|
||||
Trxamt: refundFee,
|
||||
Reqsn: utils.GetUUID(),
|
||||
Remark: refundDesc,
|
||||
OldTrxID: orderPay.TransactionID,
|
||||
})
|
||||
@@ -163,7 +162,7 @@ func refundOrderByTL(ctx *jxcontext.Context, orderPay *model.OrderPay, refundID
|
||||
VendorID: orderPay.VendorID,
|
||||
Status: model.RefundStatusNo,
|
||||
TransactionID: orderPay.TransactionID,
|
||||
RefundFee: orderPay.TotalFee,
|
||||
RefundFee: refundFee,
|
||||
RefundCreatedAt: time.Now(),
|
||||
}
|
||||
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
||||
|
||||
Reference in New Issue
Block a user