微信公众号支付付款之后收不到回调。
我们把请求参数拿出来,找到notify_url,自己用浏览器去访问这个url是通的,说明这个url本身是没有提问的。但是付款之后微信就是回调不回来。
伊谢尔伦2017-04-18 10:07:18
You can make a compromise. When the interface has not been approved, the callback is useless. At this time, you can actively initiate a query, that is, on the page where the user scans the code, the backend AJAX can check it once every 10 seconds.
PHPz2017-04-18 10:07:18
Check the web server log to see if there are any requests from Tencent’s IP.
天蓬老师2017-04-18 10:07:18
For this question, I don’t agree with @tintchao’s answer because Polling consumes too much performance. The official website also provides applicable scenarios for order inquiry:
Situations where the query interface needs to be called:
When there is an abnormality in the merchant's backend, network, server, etc., the merchant's system does not receive the payment notification in the end;
After calling the payment interface, a system error or unknown transaction status is returned;
Call the scanned payment API and return the status of USERPAYING;
Before calling the custom order or cancellation interface API, you need to confirm the payment status;
Back to the topic, it is recommended that the subject check as follows:
Check whether notify_url is accessible, pay attention to the POST
方式,不是 GET
method.
Check the server log to see if there is an IP request from Tencent after calling the relevant API.
Check whether the web interface can accept XML format data requests.
天蓬老师2017-04-18 10:07:18
Hello poster, has your problem been solved now? I am also encountering the same problem now
大家讲道理2017-04-18 10:07:18
Make sure the URL is accurate and accessible from the external network
As shown below, determine whether to configure the authorization directory
PHP中文网2017-04-18 10:07:18
The poster can search for a software called natapp, which can directly enable external network access locally, which makes debugging easier! !