Compare commits

...

2 Commits

Author SHA1 Message Date
陈俊宏 2c88c0b019 Merge remote-tracking branch 'origin/dev/dev1.0' into dev/dev1.0
# Conflicts:
#	app/third/paymentService/wechat_service.go
2024-08-20 11:27:37 +08:00
陈俊宏 c0724d3356 微信退款,需要原订单总额 2024-08-20 11:26:25 +08:00
2 changed files with 2 additions and 1 deletions

View File

@ -166,6 +166,7 @@ type OrderRefundRequest struct {
RefundOrderId int64 `json:"refund_order_id"` // 退款订单号 RefundOrderId int64 `json:"refund_order_id"` // 退款订单号
RefundReason string `json:"refund_reason"` // 退款原因 RefundReason string `json:"refund_reason"` // 退款原因
RefundAmount int64 `json:"refund_amount"` // 退款金额,单位分 RefundAmount int64 `json:"refund_amount"` // 退款金额,单位分
TotalAmount int64 `json:"total_amount"` // 订单总额
PayChannel int `json:"pay_channel"` // 支付渠道类型 1:wx,2:zfb PayChannel int `json:"pay_channel"` // 支付渠道类型 1:wx,2:zfb
Wx WxPay `json:"wx"` Wx WxPay `json:"wx"`
Ali AliPay `json:"ali"` Ali AliPay `json:"ali"`

View File

@ -236,7 +236,7 @@ func WxOrderRefund(ctx context.Context, orderRefundRequest OrderRefundRequest) (
SetBodyMap("amount", func(bm gopay.BodyMap) { SetBodyMap("amount", func(bm gopay.BodyMap) {
// 退款金额:单位是分 // 退款金额:单位是分
bm.Set("refund", orderRefundRequest.RefundAmount). //实际退款金额 bm.Set("refund", orderRefundRequest.RefundAmount). //实际退款金额
Set("total", orderRefundRequest.RefundAmount). // 折扣前总金额(不是实际退款数) Set("total", orderRefundRequest.TotalAmount). // 折扣前总金额(不是实际退款数)
Set("currency", "CNY") Set("currency", "CNY")
}) })
// body参数Body // body参数Body