public function pay(Request $rst){
$url = ‘http://xxx.com/index/pay/payNotify‘; //你的微信支付回调域名
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS,‘你的XML数据(从第一次支付成功保存到数据库或者日志里查看‘);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type:text/xml; charset=utf-8"));
$result = curl_exec($ch); // 抓取URL并把它传递给浏览器
exit($result);
}