Use WeChat's online signature tool to check whether the signature is consistent with the signature generated by the program. If it is consistent with WeChat's online signature tool, it means that there is no error in the program, and it is determined that the API key is wrong.
If it is consistent with WeChat's online signature tool, it means that there is no error in the program, and it is determined that the API key is wrong. To place an order uniformly with merchant number A, it is also necessary for merchant number A to log in to the merchant platform to set the key. It should be noted that the type of totalfee parameter in the unified order request parameter is int type. If it is inconsistent with the online signature tool of WeChat, it means that there is an error in the program, and the common errors may be.
Coding problem, make sure everything is utf-8. If there is Chinese, you can change Chinese into English first and re-sign it to see if there is any signature error. English is right, but Chinese is wrong. Basically, it must be a coding problem. The case of the fields in the message is exactly the same as that in the document. The signature types of unified ordering and payment adjustment need to be consistent, and the types and formats of parameters and length restrictions need to fully meet the requirements of the document.