WeChat Pay unified issued an order with an error in the signature of the interface.

Wechat"s unified API for issuing orders always reports signature errors!
I use Wechat"s official signature to verify that the signature result is the same. Is there any good way to verify what caused the signature error?

here is the xml: passed by my calling API

<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"
}

verify that the signature is consistent, then your algorithm is correct. Next, verify the input information.
possible mistakes:

  1. an official account may correspond to multiple merchant numbers. Check whether it is consistent.
  2. whether the case of the parameter names used by the front and rear ends is the same, the order can be different.
  3. Wechat has an inexplicable cache. Try refreshing it more often.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c0644b-327e5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c0644b-327e5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?