关于微信扫码支付回调的处理

由于微信返回的xml格式所以要解析

$result = file_get_contents('php://input', 'r');
$data = json_decode(json_encode(simplexml_load_string($result, 'SimpleXMLElement', LIBXML_NOCDATA)), true);

这样我们输出一下就是对象了

接受成功后要通知微信接受成了

echo 'success';

猜你喜欢

转载自www.cnblogs.com/coolly/p/9259396.html