报错商户调起支付接口时,传入分账参数,返回如下错误:
{"nonce_str":"Tjx3V6tXslmuplA2","appid":"wx879c6e5e95001c8d","sign":"149493D8BED89DF01E51B3AE8EB1A4FC8DEA8423AA160977D0A8FE23758026DF","err_code":"NOAUTH","return_msg":"OK","result_code":"FAIL","err_code_des":"没有分账权限","mch_id":"1554063301","sub_mch_id":"1651709482","return_code":"SUCCESS"}
另一个子商户号分账又没问题:1613482634
代码都是一样的,只是商户号不同,为什么会有两种不同的结果?
出错的商户和订单请求参数:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xml>
<appid>wx879c6e5e95001c8d</appid>
<body>恒宇酒店账单</body>
<mch_id>1554063301</mch_id>
<nonce_str>f06bff4abc2c41098ac407a9f1acf271</nonce_str>
<notify_url>http://neijlw.w3.luyouxia.net/pay/payNotify/WeiXin</notify_url>
<openid>oQhr51U-DCBHp2aHrudcSt4klqL8</openid>
<out_trade_no>EZ202308300948073052</out_trade_no>
<profit_sharing>Y</profit_sharing>
<sign>B62F5E1A07771DE2B6DE165073A3E43209F200FF68C8616B17B82406B6A45368</sign>
<sign_type>HMAC-SHA256</sign_type>
<spbill_create_ip>192.168.1.150</spbill_create_ip>
<sub_mch_id>1651709482</sub_mch_id>
<total_fee>500</total_fee>
<trade_type>JSAPI</trade_type>
</xml>
正常的商户订单参数:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xml>
<appid>wx879c6e5e95001c8d</appid>
<body>订单</body>
<mch_id>1554063301</mch_id>
<nonce_str>a6d469b31c1647b689713e95bdb96dfc</nonce_str>
<notify_url>http://neijlw.w3.luyouxia.net/pay/payNotify/WeiXin</notify_url>
<openid>oQhr51U-DCBHp2aHrudcSt4klqL8</openid>
<out_trade_no>EZ202308300954309325</out_trade_no>
<profit_sharing>Y</profit_sharing>
<sign>047D16C6E8972921FC6C7312BBC573B846EB6E4D1E978314BE5224E5A533C353</sign>
<sign_type>HMAC-SHA256</sign_type>
<spbill_create_ip>192.168.1.150</spbill_create_ip>
<sub_mch_id>1613482634</sub_mch_id>
<total_fee>1689</total_fee>
<trade_type>JSAPI</trade_type>
</xml>
除了个别订单的实际参数值不同,其他没看出有哪里不一样
检查1651709482这个商户号的分账开通及授权情况
特约商户也开通了分账功能,仍然报错