diff --git a/app/services/thirdpay/do/pay.go b/app/services/thirdpay/do/pay.go index 8f23025..6249fec 100644 --- a/app/services/thirdpay/do/pay.go +++ b/app/services/thirdpay/do/pay.go @@ -121,7 +121,6 @@ func (w *Pay) Refund() { RefundOrderId: w.RelationOrder.Id, RefundReason: w.PayParam.Desc, RefundAmount: int64(w.PayParam.Amount), - PayChannel: w.PayParam.Channel.ChannelType, } if refundFunc, ok = RefundWayList[w.PayParam.Channel.ChannelType]; !ok { w.PayCode = errorcode.PayChannelNotBuild @@ -138,6 +137,7 @@ func (w *Pay) Refund() { code := services.OrderUpdate(w.Order, "status") if code != errorcode.Success { w.PayCode = code + return } } else { w.PayCode = errorcode.PreRefundFail diff --git a/app/services/thirdpay/do/refund_way.go b/app/services/thirdpay/do/refund_way.go index b43e4b9..4ccb9f5 100644 --- a/app/services/thirdpay/do/refund_way.go +++ b/app/services/thirdpay/do/refund_way.go @@ -13,6 +13,7 @@ var RefundWayList = map[int]func(commonRefundInfo *paymentService.OrderRefundReq } func WechatH5Refund(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error { + commonRefundInfo.PayChannel = common.PAY_CHANNLE_TYPE_WECHAT err := sonic.Unmarshal([]byte(channel.ExtJson), &commonRefundInfo.Wx) if err != nil { return err @@ -22,6 +23,7 @@ func WechatH5Refund(commonRefundInfo *paymentService.OrderRefundRequest, channel } func AlipayWebRefund(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error { + commonRefundInfo.PayChannel = common.PAY_CHANNLE_TYPE_ZFB err := sonic.Unmarshal([]byte(channel.ExtJson), &commonRefundInfo.Ali) if err != nil { return err