下面是我接收异步通知的代码,就是接收不到通知,
<?php
header('Access-Control-Allow-Origin: *');
header('Content-type: text/plain');
$out_trade_no = $_POST['out_trade_no'];
$order_sn = $_POST['body'];
$rid="11";
if($_POST['trade_status'] == 'TRADE_FINISHED' || $_POST['trade_status'] == 'TRADE_SUCCESS') {
$mysqli = new mysqli('xxxx','xxxx','xxxx','xxxx');
$sql = "insert into pay_log(out_trade_no,order_sn,total) values ('{$out_trade_no}','{$order_sn}','{$rid}');";
mysqli_query($mysqli, $sql);
}else{
echo 'fail';
}
echo 'success';
?>
附件是我支付宝的通知地址
求大神填坑啊,可以付费