亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

php - WeChat Pay cannot receive the XML data of successful payment sent from the WeChat server?
我想大聲告訴你
我想大聲告訴你 2017-05-16 13:06:38
0
4
906

Downloaded the official DEMO of WeChat Pay and paid using Mode 2. There is no problem with the payment now and the payment can be successful. However, the XML data sent by WeChat cannot be received in the callback notify.php;

The notify.php code is as follows:

$input = $GLOBALS['HTTP_RAW_POST_DATA'];
$xml = simplexml_load_string($input, 'SimpleXMLElement', LIBXML_NOCDATA);
var_dump($xml);

The WeChat official account payment authorization directory is as follows:

我想大聲告訴你
我想大聲告訴你

reply all(4)
世界只因有你

If yesPHP7Use the following method to obtain the WeChat asynchronous notification parameters


file_get_contents("php://input");

PHPzhong

$GLOBALS['HTTP_RAW_POST_DATA']; It seems that the entire function has been deleted in php7, use file_get_contents('php://input')

滿天的星座

1. First check the log in nginx or apache to check whether the WeChat client requested a callback connection after the payment was successful.
2. If a link is requested, check the function logic issues in the callback

曾經(jīng)蠟筆沒有小新

Higher versions of PHP are not availableHTTP_RAW_POST_DATA
Please use them consistently

file_get_contents('php://input');
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template