WeChat payment, 1 times after payment, callback notice as if the request has many times, so will not be repeated storage ...
Source: Internet
Author: User
KeywordsMicro-credit Payment PHP
This is a 1-time callback notification, you can see that there are 7, and the time interval is quite large. This will not be repeated verification of payment information and storage, the same would increase the pressure on the server
I have feedback to Oh, I use the official PHP SDK, the code is as follows:
// 前面的内容和SDK一模一样,省略了Log::DEBUG("begin notify");$notify = new PayNotifyCallBack();$notify->Handle(false);// 返回给确认echo $notify->ToXml();
But it doesn't seem to work, so I'm going to Handlefalse change it true , and it doesn't seem to work.
// 前面的内容和SDK一模一样,省略了Log::DEBUG("begin notify");$notify = new PayNotifyCallBack();$notify->Handle(true);// 返回给确认echo $notify->ToXml();
What do you want to do, please? is not what I have omitted to solve
Reply content:
This is a 1-time callback notification, you can see that there are 7, and the time interval is quite large. This will not be repeated verification of payment information and storage, the same would increase the pressure on the server
I have feedback to Oh, I use the official PHP SDK, the code is as follows:
// 前面的内容和SDK一模一样,省略了Log::DEBUG("begin notify");$notify = new PayNotifyCallBack();$notify->Handle(false);// 返回给确认echo $notify->ToXml();
But it doesn't seem to work, so I'm going to Handlefalse change it true , and it doesn't seem to work.
// 前面的内容和SDK一模一样,省略了Log::DEBUG("begin notify");$notify = new PayNotifyCallBack();$notify->Handle(true);// 返回给确认echo $notify->ToXml();
What do you want to do, please? is not what I have omitted to solve
After you have handled the business, you need to give feedback to the server so that you can stop it from continuing the request.
Also, in your code, of course, you have to decide whether to repeat the same order.
It provides the SDK I did not much research, in fact, the processing of the business directly echo ' SUCCESS ' on it, later, the logic of processing business should be made asynchronous.
The callback in the order before processing the order number to determine whether the order has been processed, the processed words directlyecho 'SUCCESS'
Please respond to a successful value to the server to terminate the notification, and at the same time, in the processing logic to determine whether it has been processed, double insurance.
Callback If you give him a message of success, he won't repeat it.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.