fix refund
This commit is contained in:
parent
85a19924cc
commit
97e3d86078
|
@ -9,6 +9,7 @@ import (
|
|||
"encoding/pem"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/go-pay/gopay/wechat/v3"
|
||||
"service/api/base"
|
||||
"service/api/errs"
|
||||
accountproto "service/api/proto/account/proto"
|
||||
|
@ -2707,7 +2708,8 @@ func (v *Vas) refundZoneAdmission(ctx *gin.Context, order *dbstruct.Order, req *
|
|||
switch order.GetPayType() {
|
||||
case vasproto.PayTypeAlipay, vasproto.PayTypeAlipayH5:
|
||||
alipayCli := alipaycli.GetAlipayClientByAppId(order.GetOid3())
|
||||
resp, err := alipayCli.RefundOne(ctx, &alipaycli.RefundOneParam{
|
||||
var resp *alipay.TradeRefundResponse
|
||||
resp, err = alipayCli.RefundOne(ctx, &alipaycli.RefundOneParam{
|
||||
OutTradeNo: orderId,
|
||||
RefundAmount: order.GetPayAmount(),
|
||||
RefundReason: "用户退款",
|
||||
|
@ -2718,7 +2720,8 @@ func (v *Vas) refundZoneAdmission(ctx *gin.Context, order *dbstruct.Order, req *
|
|||
}
|
||||
case vasproto.PayTypeWxpayNative, vasproto.PayTypeWxpayJsapi, vasproto.PayTypeWxpayH5:
|
||||
wxpayCli := wxpaycli.GetDefaultWxpayClient()
|
||||
resp, err := wxpayCli.RefundOne(ctx, &wxpaycli.RefundOneParam{
|
||||
var resp *wechat.RefundRsp
|
||||
resp, err = wxpayCli.RefundOne(ctx, &wxpaycli.RefundOneParam{
|
||||
OutTradeNo: orderId,
|
||||
RefundAmount: order.GetPayAmount(),
|
||||
RefundReason: "用户退款",
|
||||
|
|
Loading…
Reference in New Issue