When the mobile phone webpage calls the payment, the configuration of policy_url does not callback should be normal, because the payment is OK, and you can see the successful payment flow in the public account background.
The called js interface only receives the get_brand_wcpay_request: OK returned by js, and the set callback notification address does not respond (debug with logs ).
According to the official demo + thinkphp framework, the solution is saved. Tossing for a long time
Reply to discussion (solution)
$ Policy_url = 'http: // '. $ _ SERVER ['http _ host'] ..'/wx_pay_policy.php ';
I didn't do urlencode
$ Policy_url = 'http: // '. $ _ SERVER ['http _ host'] ..'/wx_pay_policy.php ';
I didn't do urlencode
This is the root directory. how can this problem be solved without the root directory of the website?
The content of wx_pay_policy.php is as follows:
Your callback address must be accessible.
It has nothing to do with whether it is in the root directory.
Is the problem solved by the landlord? My jsapi and native payment are fine. But tx does not send data to the callback page. The My callback page is also an accessible address on the Internet and is in the same directory as the payment. Depressed
What is the URL configuration result of NOTIFY_URL?
It seems inappropriate.
If it is set to the original raw url, is there a problem?
Try writing the complete address directly. do not use variables or the like.
The callback is definitely gone, and there are too many pitfalls in jsapi:
1. you can only jump to the service number to pay, the subscription number will prompt that you cannot pay across the number, the payment has become a special number, the document does not see, the results finally sent a text message to the user, add Group, then send the link to the payment
2. some users cannot obtain the openid.
3. on the payment success page, you must click finish to close the success prompt page to notify you of the js payment status.
4. various keys have a validity period of 2 hours, but there is a limited number of traps every day.
5. I will run a program every day to compare the order and check whether the order has been successfully paid so that my data and data can be synchronized.
6. The Order No. cannot be found in the public account flow. you need to go to the merchant's background to check the order no. is not the merchant's background of Caifu Tong?
7. I don't want to touch the order number here.