From 88cca7428380c1edf3e5f854198259c23e9bcc29 Mon Sep 17 00:00:00 2001 From: public_host Date: Wed, 27 Jan 2021 17:28:21 +0800 Subject: [PATCH] init --- src/V2/pay.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/V2/pay.go b/src/V2/pay.go index cd05a4d..1ded759 100644 --- a/src/V2/pay.go +++ b/src/V2/pay.go @@ -218,6 +218,15 @@ func (c WxPay) RefundQuery(params RefundQuery) (map[string]string, error) { return c.request("https://api.mch.weixin.qq.com/pay/refundquery", strings.NewReader(utils.MAP2XML(m)), false) } +// ProfitSharingOrderAmountQuery 查询最大分账比例 +func (c WxPay) ProfitSharingOrderAmountQuery(params Receiver) (map[string]string, error) { + m := c.publicParams() + b, _ := json.Marshal(params) + m["receiver"] = string(b) + m["sign"] = utils.SignHMACSHA256(m, c.config.Secret) + return c.request("https://api.mch.weixin.qq.com/pay/profitsharingorderamountquery", strings.NewReader(utils.MAP2XML(m)), false) +} + // ProfitSharingAddReceiver 添加分账接受方 func (c WxPay) ProfitSharingAddReceiver(params Receiver) (map[string]string, error) { m := c.publicParams()