Home >WeChat Applet >WeChat Development >WeChat Pay Development Rights Protection Notice
1. Rights Protection Notification URL
As mentioned in WeChat Payment Development (1) WeChat Payment URL Configuration, the rights protection notification URL is http://www.doucube.com/wxpay/rights.php
2. User Rights Protection System Interface
When users have abnormal payment and purchase behavior on the official account, they usually complain to Tencent customer service, so WeChat needs to know the official account in real time No details of user transactions. At the same time, in order to solve users' problems as quickly and efficiently as possible, WeChat, as a bridge connecting users and merchants, will instantly synchronize problems to merchants through this customer service system and feedback the solution results to users.
After the user adds a complaint form, the WeChat background will notify (post) the merchant server (payfeedback_url) of the payment result. Merchants can use the notification results of payfeedback_url to display personalized pages. Note: Please submit payfeedback_url to the relevant interface person on WeChat. It will be available after registration on WeChat side.
Background notification is carried out through payfeedback_url in the request, using the post mechanism.
3. User application for rights protection
##4. Procedure Implementation Directly obtain the xml data package mentioned in the rights protection program file. The program implementation is as follows:<?php $postStr = $GLOBALS["HTTP_RAW_POST_DATA"]; logger($postStr); //日志记录 function logger($log_content) { $max_size = 100000; $log_filename = "log.xml"; if(file_exists($log_filename) and (abs(filesize($log_filename)) > $max_size)){unlink($log_filename);} file_put_contents($log_filename, date('H:i:s')." ".$log_content."\r\n", FILE_APPEND); } ?>When the user adds a new complaint, the XML is obtained as follows
<xml> <OpenId><![CDATA[o0pk9uIVnlY-fJkzFKEbQ6LJ4cFc]]></OpenId> <AppId><![CDATA[wxc04ce1d87dcd13cd]]></AppId> <TimeStamp>1401206434</TimeStamp> <MsgType><![CDATA[request]]></MsgType> <FeedBackId>13275936403980775178</FeedBackId> <TransId><![CDATA[1218614901201405273313470595]]></TransId> <Reason><![CDATA[没有收到货品]]></Reason> <Solution><![CDATA[退款,并不退货]]></Solution> <ExtInfo><![CDATA[Test 13456780012]]></ExtInfo> <AppSignature><![CDATA[1f4a626f59f9ae8007158b0a9510e88db56fa80b]]></AppSignature> <SignMethod><![CDATA[sha1]]></SignMethod> </xml>User After confirming that the complaint has been processed, the developer will then parse the xml data and perform subsequent processing. For more articles related to WeChat payment development rights protection notice, please pay attention to the PHP Chinese website!