In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to get an alarm notice in WeChat Pay. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
I. alarm notice
In order to timely notify merchants of anomalies and improve the service quality of merchants on Wechat platform. Wechat backend will push alarm notifications to merchants, including delivery delays, failed calls, failed notifications, and so on. The address of the notification is the alarm notification URL entered by merchants when applying for payment, which can be viewed in "Public platform-Services-Service Center-merchant features-merchant basic information-alarm notification URL". After receiving the alarm notice, merchants need to fix the problems mentioned in it as soon as possible, so as not to affect the online business.
The postData received by the alarm notification URL will also contain xml data in the following format:
1001 1393860740
II. Program reception
It has been mentioned in WeChat Pay Development (1) WeChat Pay URL configuration that the alarm notification url is set to
Http://www.doucube.com/wxpay/alarm.php
Now it's time to implement the alarm.php function, which can be obtained by imitating the basic API SDK of Wechat. Write details to a database or other storage
$postStr = $GLOBALS ["HTTP_RAW_POST_DATA"]; $postObj = simplexml_load_string ($postStr, 'SimpleXMLElement', LIBXML_NOCDATA); logger ("error type:". $postObj- > ErrorType. " Misunderstanding description: ". $postObj- > Description." Error details: ". $postObj- > AlarmContent); / / logging function logger ($log_content) {$max_size = 1000000; $log_filename =" log.xml "; if (file_exists ($log_filename) and (abs ($log_filename)) > $max_size)) {unlink ($log_filename);} file_put_contents ($log_filename, date ('Hi function logger').". $log_content. "\ r\ n", FILE_APPEND) } this is the end of the article on "how to get an alarm notice in WeChat Pay". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.