diff --git a/app/third/paymentService/payment_service.go b/app/third/paymentService/payment_service.go index 38b3bd2..6cfc456 100644 --- a/app/third/paymentService/payment_service.go +++ b/app/third/paymentService/payment_service.go @@ -165,8 +165,7 @@ type OrderRefundRequest struct { OrderId int64 `json:"order_id"` // 订单编号 RefundOrderId int64 `json:"refund_order_id"` // 退款订单号 RefundReason string `json:"refund_reason"` // 退款原因 - RefundAmount int64 `json:"refund_amount"` // 退款金额,单位分 - TotalAmount int64 `json:"total_amount"` // 订单总额 + RefundAmount int64 `json:"refund_amount"` // 退款金额,单位分, 微信需要传入订单总额,而不是用户实际支付金额 PayChannel int `json:"pay_channel"` // 支付渠道类型 1:wx,2:zfb Wx WxPay `json:"wx"` Ali AliPay `json:"ali"` diff --git a/app/third/paymentService/wechat_service.go b/app/third/paymentService/wechat_service.go index 0ec2caf..7e7d1bb 100644 --- a/app/third/paymentService/wechat_service.go +++ b/app/third/paymentService/wechat_service.go @@ -236,7 +236,7 @@ func WxOrderRefund(ctx context.Context, orderRefundRequest OrderRefundRequest) ( SetBodyMap("amount", func(bm gopay.BodyMap) { // 退款金额:单位是分 bm.Set("refund", orderRefundRequest.RefundAmount). //实际退款金额 - Set("total", orderRefundRequest.TotalAmount). // 折扣前总金额(不是实际退款数) + Set("total", orderRefundRequest.RefundAmount). // 折扣前总金额(不是实际退款数) Set("currency", "CNY") }) // body:参数Body