diff --git a/constant.go b/constant.go index 3d4bdc23..b0360823 100644 --- a/constant.go +++ b/constant.go @@ -7,7 +7,7 @@ const ( OK = "OK" DebugOff = 0 DebugOn = 1 - Version = "1.5.68" + Version = "1.5.69" ) type DebugSwitch int8 diff --git a/release_note.txt b/release_note.txt index 5d6e4279..d2036fbf 100644 --- a/release_note.txt +++ b/release_note.txt @@ -1,3 +1,7 @@ +版本号:Release 1.5.69 +修改记录: + (1) 微信V3:修改 client.V3RefundQuery()、增加入参参数,适配 服务商 模式 + 版本号:Release 1.5.68 修改记录: (1) 微信V3:修复 client.V3ComplaintResponse()、client.V3ComplaintComplete(), complaintId 参数类型错误问题 diff --git a/wechat/v3/refund.go b/wechat/v3/refund.go index 9f7651fc..6b6ce97e 100644 --- a/wechat/v3/refund.go +++ b/wechat/v3/refund.go @@ -37,11 +37,15 @@ func (c *ClientV3) V3Refund(ctx context.Context, bm gopay.BodyMap) (wxRsp *Refun } // 查询单笔退款API +// 注意:商户查询时,bm 可传 nil;服务商时,传相应query参数 // Code = 0 is success // 商户文档:https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_10.shtml // 服务商文档:https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_1_10.shtml -func (c *ClientV3) V3RefundQuery(ctx context.Context, outRefundNo string) (wxRsp *RefundQueryRsp, err error) { +func (c *ClientV3) V3RefundQuery(ctx context.Context, outRefundNo string, bm gopay.BodyMap) (wxRsp *RefundQueryRsp, err error) { uri := fmt.Sprintf(v3DomesticRefundQuery, outRefundNo) + if bm != nil { + uri = fmt.Sprintf(v3DomesticRefundQuery, outRefundNo) + "?" + bm.EncodeURLParams() + } authorization, err := c.authorization(MethodGet, uri, nil) if err != nil { return nil, err