微信H5支付 API接口返回失败。
<xml>
<appid><![CDATA[wxd4c8dxxxxx64d35]]></appid>
<mch_id>149xxxx872</mch_id>
<device_info><![CDATA[WEB]]></device_info>
<nonce_str><![CDATA[0o8kbg9rxnxxxxxndtqq4bbp6z3vwn]]></nonce_str>
<sign_type><![CDATA[MD5]]></sign_type>
<body><![CDATA[充值 ¥111 手机号:155xxxx9063]]></body>
<attach>123</attach><out_trade_no><![CDATA[DGCZ20190315040019996538]]></out_trade_no>
<fee_type><![CDATA[CNY]]></fee_type>
<total_fee>11100</total_fee>
<spbill_create_ip><![CDATA[127.0.0.1]]></spbill_create_ip>
<time_start>20190315160019</time_start>
<time_expire>1552637419</time_expire>
<notify_url><![CDATA[http://digua.test/kehu_paymentnotice/nofifywx]]></notify_url><trade_type><![CDATA[MWEB]]></trade_type>
<scene_info><![CDATA[{"h5_info":{"type":"Wap","wap_url":"http:\/\/digua.test","wap_name":"充值 ¥111 手机号:155xxxx9063"}}]]></scene_info>
<sign><![CDATA[6ADB510BD5.....BE65F0E194018]]></sign>
</xml>
以上是发送API的xml包格式
我通过在微信官方签名校验工具测试已经是通过的
但是在实际发送到api的返回,依然还是签名错误。
可以确保mch_id信息是对的。请问有遇到过同样问题的伙伴么?
最终发现是字段格式问题 h5的统一下单时间字段格式要求使用YYYMMDDHHIISS格式 而非时间戳格式