java - 微信公众号支付付款之后收不到回调。
迷茫
迷茫 2017-04-18 10:05:18
0
11
1813

微信公众号支付付款之后收不到回调。
我们把请求参数拿出来,找到notify_url,自己用浏览器去访问这个url是通的,说明这个url本身是没有提问的。但是付款之后微信就是回调不回来。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(11)
伊谢尔伦

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.

PHPzhong

Check the web server log to see if there are any requests from Tencent’s IP.

Peter_Zhu

Your domain name has been blocked by WeChat

小葫芦

It may be that the payment authorization directory is not set.

伊谢尔伦

No parameters are allowed in the url

如?param=value
洪涛

Your URL must be accessible from the external network

Peter_Zhu

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:

  1. Check whether notify_url is accessible, pay attention to the POST 方式,不是 GET method.

  2. Check the server log to see if there is an IP request from Tencent after calling the relevant API.

  3. Check whether the web interface can accept XML format data requests.

Peter_Zhu

Hello poster, has your problem been solved now? I am also encountering the same problem now

大家讲道理
  1. Make sure the URL is accurate and accessible from the external network

  2. As shown below, determine whether to configure the authorization directory

洪涛

The poster can search for a software called natapp, which can directly enable external network access locally, which makes debugging easier! !

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!