yingzi 2 anos atrás
pai
commit
0e8126bc2d
1 arquivos alterados com 1 adições e 2 exclusões
  1. 1 2
      app/api/controller/Pay.php

+ 1 - 2
app/api/controller/Pay.php

@@ -20,12 +20,11 @@ class Pay extends BaseController{
      */
     public function wxpayNotify(Request $request){
         $logfile = app()->getRootPath().'public/log/wxnotify.log';
-        file_put_contents($logfile, date("Y-m-d H:i:s").PHP_EOL,FILE_APPEND | LOCK_EX);
         $xmlData = $request->getInput();
         if(empty($xmlData)){
             return false;
         }
-        file_put_contents($logfile, $xmlData.PHP_EOL,FILE_APPEND | LOCK_EX);
+        file_put_contents($logfile, PHP_EOL.date("Y-m-d H:i:s").PHP_EOL.$xmlData.PHP_EOL,FILE_APPEND | LOCK_EX);
         $wxpay = new wxpayApi();
         //回调验签
         $res = $wxpay->notifyCheckSign($xmlData);