Current location - Quotes Website - Personality signature - Wechat jsapi payment v3 shows that the merchant's signature is wrong.
Wechat jsapi payment v3 shows that the merchant's signature is wrong.
Hello, I have solved this problem. You'd better check your signature process. The following is my logic. You can refer to it and see if there is anything wrong. Basically, if you follow this logic, you won't go wrong.

/*

* logic:

* 1. Configure WeChat js sdk config to ensure normal use of WeChat js sdk in the background.

* 2. Obtain the parameters needed to obtain prepay_id and pass them to /pay/unifiedorder to obtain unified ordering information.

* 3. Obtain paySign according to the signatures of' appid',' timeStamp',' nonceStr',' package' and' signType' = 'MD5' of the order information.

* 4. At this point, WeChat payment is over.

*

*/