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

因为微信返回的xml格式因此要解析php

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

这样咱们输出一下就是对象了微信

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

echo 'success';xml

相关文章
相关标签/搜索