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
<?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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
