|
|
@ -8,6 +8,7 @@ import ( |
|
|
|
"errors" |
|
|
|
"io" |
|
|
|
"io/ioutil" |
|
|
|
"log" |
|
|
|
"net/http" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
@ -219,11 +220,13 @@ func (c WxPay) RefundQuery(params RefundQuery) (map[string]string, error) { |
|
|
|
} |
|
|
|
|
|
|
|
// ProfitSharingOrderAmountQuery 查询最大分账比例
|
|
|
|
func (c WxPay) ProfitSharingOrderAmountQuery(params Receiver) (map[string]string, error) { |
|
|
|
m := c.publicParams() |
|
|
|
b, _ := json.Marshal(params) |
|
|
|
m["receiver"] = string(b) |
|
|
|
func (c WxPay) ProfitSharingOrderAmountQuery(params ProfitSharingAmountQuery) (map[string]string, error) { |
|
|
|
m := utils.MAPMerge(utils.Struct2Map(params), c.publicParams()) |
|
|
|
delete(m, "appid") |
|
|
|
delete(m, "sub_appid") |
|
|
|
delete(m, "sub_mch_id") |
|
|
|
m["sign"] = utils.SignHMACSHA256(m, c.config.Secret) |
|
|
|
log.Println("m,", m) |
|
|
|
return c.request("https://api.mch.weixin.qq.com/pay/profitsharingorderamountquery", strings.NewReader(utils.MAP2XML(m)), false) |
|
|
|
} |
|
|
|
|
|
|
|