正在显示
1 个修改的文件
包含
2 行增加
和
0 行删除
@@ -389,6 +389,7 @@ class Pay extends Api | @@ -389,6 +389,7 @@ class Pay extends Api | ||
389 | $config = config('verify.wx_pay'); | 389 | $config = config('verify.wx_pay'); |
390 | $app = Factory::payment($config); | 390 | $app = Factory::payment($config); |
391 | $response = $app->handlePaidNotify(function($message, $fail){ | 391 | $response = $app->handlePaidNotify(function($message, $fail){ |
392 | + Log::write(date('Y-m-d H:i:s').json_encode($message,JSON_UNESCAPED_UNICODE),'notice'); | ||
392 | $data = Db::name('toporder') | 393 | $data = Db::name('toporder') |
393 | ->where('num',$message['out_trade_no']) | 394 | ->where('num',$message['out_trade_no']) |
394 | ->find(); | 395 | ->find(); |
@@ -440,6 +441,7 @@ class Pay extends Api | @@ -440,6 +441,7 @@ class Pay extends Api | ||
440 | $toporder['status'] = 1; | 441 | $toporder['status'] = 1; |
441 | //支付失败 | 442 | //支付失败 |
442 | Db::name('toporder')->where('num',$message['out_trade_no'])->update($toporder); | 443 | Db::name('toporder')->where('num',$message['out_trade_no'])->update($toporder); |
444 | + return false; | ||
443 | } | 445 | } |
444 | }else{ | 446 | }else{ |
445 | return $fail('通信失败,请稍后再通知我'); | 447 | return $fail('通信失败,请稍后再通知我'); |
-
请 注册 或 登录 后发表评论