PostData of the delivery notification interface is mentioned in the WeChat payment document, which is actually not an item in a form. In fact, the reference to PostData is a bit misleading and can be understood as a json string.
When ok is returned, ask the merchant whether the background has received the notification of successful transaction, and if so, the front end will display the interface of successful transaction; If no notice is received at this time, the merchant background actively calls the interface for querying orders to query the current status of orders, and feeds back the corresponding interface to the front end.
The appid appearing in the debug delivery interface is different from the appid of access _ token; The problem is generally not that appId and access_token do not match, because most developers can get the correct access_token. The main reason is that (1) forms may be submitted with various parameters. (2) Non-json format. (3) Understand PostData as a hidden field in the form and distribute json data.
According to the code, the problem of delivery notification interface can be solved. Of course, various merchant IDs and keys of WeChat accounts should also be configured correctly.