Compare commits

..

No commits in common. "f24a725cef1af9c3dc75b69812a3c840af692fd5" and "bdfd4c6b9cb11f6beef1295b9bdb9ee522b28ff1" have entirely different histories.

5 changed files with 1 additions and 6 deletions

View File

@ -5,7 +5,6 @@ type OrdersResp struct {
OrderType int `json:"order_type"`
OutTradeNo string `json:"out_trade_no"`
Amount int `json:"amount"`
PayerTotal int `json:"payer_total"`
Desc string `json:"desc"`
Status int `json:"status"`

View File

@ -121,6 +121,7 @@ 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
@ -137,7 +138,6 @@ func (w *Pay) Refund() {
code := services.OrderUpdate(w.Order, "status")
if code != errorcode.Success {
w.PayCode = code
return
}
} else {
w.PayCode = errorcode.PreRefundFail

View File

@ -13,7 +13,6 @@ 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
@ -23,7 +22,6 @@ 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

View File

@ -27,7 +27,6 @@ func NewOrdersResp(db *ordersmodel.Orders) *api.OrdersResp {
Status: db.Status,
OrderType: db.OrderType,
Amount: db.Amount,
PayerTotal: db.PayerTotal,
Desc: db.Desc,
CreateTime: db.CreateTime.Format("2006-01-02 15:04:05"),
}

View File

@ -151,7 +151,6 @@ func (o *OrderNotify) updateOrder() {
return
}
o.order.Status = o.Status
o.order.PayerTotal = o.ActualAmount
o.Code = services.OrderUpdate(o.order, "status")
return
}