Compare commits
No commits in common. "f24a725cef1af9c3dc75b69812a3c840af692fd5" and "bdfd4c6b9cb11f6beef1295b9bdb9ee522b28ff1" have entirely different histories.
f24a725cef
...
bdfd4c6b9c
|
@ -5,7 +5,6 @@ type OrdersResp struct {
|
||||||
OrderType int `json:"order_type"`
|
OrderType int `json:"order_type"`
|
||||||
OutTradeNo string `json:"out_trade_no"`
|
OutTradeNo string `json:"out_trade_no"`
|
||||||
Amount int `json:"amount"`
|
Amount int `json:"amount"`
|
||||||
PayerTotal int `json:"payer_total"`
|
|
||||||
Desc string `json:"desc"`
|
Desc string `json:"desc"`
|
||||||
|
|
||||||
Status int `json:"status"`
|
Status int `json:"status"`
|
||||||
|
|
|
@ -121,6 +121,7 @@ func (w *Pay) Refund() {
|
||||||
RefundOrderId: w.RelationOrder.Id,
|
RefundOrderId: w.RelationOrder.Id,
|
||||||
RefundReason: w.PayParam.Desc,
|
RefundReason: w.PayParam.Desc,
|
||||||
RefundAmount: int64(w.PayParam.Amount),
|
RefundAmount: int64(w.PayParam.Amount),
|
||||||
|
PayChannel: w.PayParam.Channel.ChannelType,
|
||||||
}
|
}
|
||||||
if refundFunc, ok = RefundWayList[w.PayParam.Channel.ChannelType]; !ok {
|
if refundFunc, ok = RefundWayList[w.PayParam.Channel.ChannelType]; !ok {
|
||||||
w.PayCode = errorcode.PayChannelNotBuild
|
w.PayCode = errorcode.PayChannelNotBuild
|
||||||
|
@ -137,7 +138,6 @@ func (w *Pay) Refund() {
|
||||||
code := services.OrderUpdate(w.Order, "status")
|
code := services.OrderUpdate(w.Order, "status")
|
||||||
if code != errorcode.Success {
|
if code != errorcode.Success {
|
||||||
w.PayCode = code
|
w.PayCode = code
|
||||||
return
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
w.PayCode = errorcode.PreRefundFail
|
w.PayCode = errorcode.PreRefundFail
|
||||||
|
|
|
@ -13,7 +13,6 @@ var RefundWayList = map[int]func(commonRefundInfo *paymentService.OrderRefundReq
|
||||||
}
|
}
|
||||||
|
|
||||||
func WechatH5Refund(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error {
|
func WechatH5Refund(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error {
|
||||||
commonRefundInfo.PayChannel = common.PAY_CHANNLE_TYPE_WECHAT
|
|
||||||
err := sonic.Unmarshal([]byte(channel.ExtJson), &commonRefundInfo.Wx)
|
err := sonic.Unmarshal([]byte(channel.ExtJson), &commonRefundInfo.Wx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -23,7 +22,6 @@ func WechatH5Refund(commonRefundInfo *paymentService.OrderRefundRequest, channel
|
||||||
}
|
}
|
||||||
|
|
||||||
func AlipayWebRefund(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error {
|
func AlipayWebRefund(commonRefundInfo *paymentService.OrderRefundRequest, channel *paychannelmodel.PayChannel) error {
|
||||||
commonRefundInfo.PayChannel = common.PAY_CHANNLE_TYPE_ZFB
|
|
||||||
err := sonic.Unmarshal([]byte(channel.ExtJson), &commonRefundInfo.Ali)
|
err := sonic.Unmarshal([]byte(channel.ExtJson), &commonRefundInfo.Ali)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -27,7 +27,6 @@ func NewOrdersResp(db *ordersmodel.Orders) *api.OrdersResp {
|
||||||
Status: db.Status,
|
Status: db.Status,
|
||||||
OrderType: db.OrderType,
|
OrderType: db.OrderType,
|
||||||
Amount: db.Amount,
|
Amount: db.Amount,
|
||||||
PayerTotal: db.PayerTotal,
|
|
||||||
Desc: db.Desc,
|
Desc: db.Desc,
|
||||||
CreateTime: db.CreateTime.Format("2006-01-02 15:04:05"),
|
CreateTime: db.CreateTime.Format("2006-01-02 15:04:05"),
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,7 +151,6 @@ func (o *OrderNotify) updateOrder() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
o.order.Status = o.Status
|
o.order.Status = o.Status
|
||||||
o.order.PayerTotal = o.ActualAmount
|
|
||||||
o.Code = services.OrderUpdate(o.order, "status")
|
o.Code = services.OrderUpdate(o.order, "status")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue