Compare commits
No commits in common. "52ce6efce1c9d3277789dcfdc32f5a1cd02717af" and "ddf380600359aecb57c919a1115f766ff7277e05" have entirely different histories.
52ce6efce1
...
ddf3806003
|
@ -32,14 +32,10 @@ type PayReqs struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type RefundReqs struct {
|
type RefundReqs struct {
|
||||||
AppId int64 `json:"app_id" validate:"required"`
|
PayCommonReqBody
|
||||||
Timestamp int64 `json:"timestamp" validate:"required"`
|
|
||||||
Amount int `json:"amount" validate:"required" label:"支付金额,单位分"`
|
|
||||||
PayChannelId int64 `json:"pay_channel_id" label:"支付渠道"`
|
|
||||||
RefundOutTradeNo string `json:"refund_out_trade_no" label:"需要退款的外侧商户订单号"`
|
RefundOutTradeNo string `json:"refund_out_trade_no" label:"需要退款的外侧商户订单号"`
|
||||||
RefundOrderId string `json:"refundOrder_id" label:"需要退款的平台订单号"`
|
RefundOrderId string `json:"refundOrder_id" label:"需要退款的平台订单号"`
|
||||||
OutTradeNo string `json:"out_trade_no" validate:"required" label:"外侧商户订单号"`
|
OutTradeNo string `json:"out_trade_no" validate:"required" label:"外侧商户订单号"`
|
||||||
Desc string `json:"desc" validate:"max=100" label:"商品描述"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type PayUrlResp struct {
|
type PayUrlResp struct {
|
||||||
|
|
|
@ -42,12 +42,6 @@ func (w *PayCheck) CheckPayInfo() {
|
||||||
if w.CheckCode != errorcode.Success {
|
if w.CheckCode != errorcode.Success {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 走收银台支付的订单可能没有支付方式兼容
|
|
||||||
if w.Reqs.PayChannelId == 0 {
|
|
||||||
w.Reqs.PayChannelId = w.OldOrder.PayChannelId
|
|
||||||
}
|
|
||||||
|
|
||||||
w.CheckPayChannel()
|
w.CheckPayChannel()
|
||||||
if w.CheckCode != errorcode.Success {
|
if w.CheckCode != errorcode.Success {
|
||||||
return
|
return
|
||||||
|
|
|
@ -55,15 +55,12 @@ func ThirdPayRefundCheck(ctx context.Context, refundReq *front.RefundReqs, appCh
|
||||||
}
|
}
|
||||||
copier.Copy(&req, refundReq)
|
copier.Copy(&req, refundReq)
|
||||||
check = thirdpay.NewPayCheck(&ctx, &req, appCheck, ip)
|
check = thirdpay.NewPayCheck(&ctx, &req, appCheck, ip)
|
||||||
|
// 校验表单
|
||||||
check.CheckOrderRefund()
|
check.CheckPayInfo()
|
||||||
if check.CheckCode != errorcode.Success {
|
if check.CheckCode != errorcode.Success {
|
||||||
return check, check.CheckCode
|
return check, check.CheckCode
|
||||||
}
|
}
|
||||||
|
check.CheckOrderRefund()
|
||||||
// 校验表单
|
|
||||||
check.CheckPayInfo()
|
|
||||||
|
|
||||||
return check, check.CheckCode
|
return check, check.CheckCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue