Home > Article > Backend Development > Scan the QR code on the website WeChat to pay. After the payment is completed, notify_url does not receive the notification and uses mode 2.
Confirm whether the callback address is correct in the configuration. I just made a WeChat QR code scanning payment, and I also used the mode 2
Crab Demon.
Check a few places. When you initiate payment, notify_url
should be filled in correctly.
On the asynchronous callback page Put the data pushed by WeChat in the log to facilitate debugging.
file_put_contents('./log.txt', file_get_contents('php://input'));
Then look at the content in log.txt for debugging
Use natapp to test it locally. You can see the problem of the request, including whether it is notified to WeChat and returned. Data and how you respond
1. The callback URL needs to be a URL accessible from the public network
2. The callback URL cannot take parameters
3. The merchant platform needs to configure the callback URL
4. In the callback URL entry Log adjustment
This is the log I wrote
I used NATAPP to test and found that the Tencent server did not send a request to pay-notify.php at all
The above is the website WeChat scan code payment. After the payment is completed, notify_url is not received Notice, the content of mode two is used. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!