作者 chencheng

0601-20

@@ -336,7 +336,6 @@ class Wechat extends Api @@ -336,7 +336,6 @@ class Wechat extends Api
336 $xml = file_get_contents("php://input"); 336 $xml = file_get_contents("php://input");
337 337
338 $xmljson= json_encode(simplexml_load_string($xml, 'SimplexmlElement', LIBXML_NOCDATA ));//将对象转换个JSON 338 $xmljson= json_encode(simplexml_load_string($xml, 'SimplexmlElement', LIBXML_NOCDATA ));//将对象转换个JSON
339 - file_put_contents('1_notify.log',($xmljson),FILE_APPEND);  
340 $message = json_decode($xmljson,true); 339 $message = json_decode($xmljson,true);
341 // 使用通知里的 "微信支付订单号" 或者 "商户订单号" 去自己的数据库找到订单 340 // 使用通知里的 "微信支付订单号" 或者 "商户订单号" 去自己的数据库找到订单
342 Db::name('wechat_pay_recode')->insert(['json'=>json_encode($message),'time'=>time(),'action'=>'pay_notify']); 341 Db::name('wechat_pay_recode')->insert(['json'=>json_encode($message),'time'=>time(),'action'=>'pay_notify']);
@@ -356,7 +355,7 @@ class Wechat extends Api @@ -356,7 +355,7 @@ class Wechat extends Api
356 } else { 355 } else {
357 356
358 } 357 }
359 - return true; // 返回处理完成 358 + echo "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml> "; // 返回处理完成
360 359
361 /* 360 /*
362 $xml = file_get_contents("php://input"); 361 $xml = file_get_contents("php://input");