请教关于微信支付 API 返回签名错误的问题?
各位前辈晚上好,请教一个关于微信公众号支付签名失败的问题。
api统一下单接口返回关于“签名失败”的错误,我已按照网络上提供的方案,尝试更换商户号API密钥,匹配公众号平台上的商户号ID,以及用官方签名验证签名,均是匹配的,但是在调用接口的时候仍然报签名失败的错误!
我使用的是EasyToWechat SDK
以下是调用api的xml,请教一下有没有解决方案,多谢!
<xml>
<mch_id>1423xxxxxxx7402</mch_id>
<nonce_str><![CDATA[5b6fc9879716a]]></nonce_str>
<body><![CDATA[deal]]></body>
<out_trade_no><![CDATA[SN2018081213435352966711]]></out_trade_no>
<total_fee>20000</total_fee>
<notify_url><![CDATA[http://xxx.com/api/payment/notify]]></notify_url>
<trade_type><![CDATA[JSAPI]]></trade_type>
<openid><![CDATA[oV8-KxxxxxxYuARnthpFiQec]]></openid>
<spbill_create_ip><![CDATA[36.xx.xxx.252]]></spbill_create_ip>
<appid><![CDATA[wxxxxxxxe73053]]></appid>
<sign><![CDATA[0400701EF7F990D9652BBxxE5E8D8ACB]]></sign>
</xml>
{
"mch_id": 1423xxxxxxx7402,
"nonce_str": "5b6fc9879716a",
"body": "deal",
"out_trade_no": "SN2018081213435352966711",
"total_fee": 20000,
"notify_url": "http://xxx.com/api/payment/notify",
"trade_type": "JSAPI",
"openid": "oV8-KxxxxxxYuARnthpFiQec",
"spbill_create_ip": "36.xx.xxx.252",
"appid": "wxxxxxxxe73053",
"sign": "0400701EF7F990D9652BBxxE5E8D8ACB"
}
推荐文章: