ソースを参照

增加日志和通知

wangzq 2 年 前
コミット
f245eb26d3
1 ファイル変更10 行追加1 行削除
  1. 10 1
      app/Modules/Trade/Pay/OrderPaySuccess.php

+ 10 - 1
app/Modules/Trade/Pay/OrderPaySuccess.php

@@ -7,7 +7,7 @@ use App\Modules\Subscribe\Models\Order;
 use DB;
 use App\Jobs\QappOrder;
 /**
- * 
+ *
  */
 class OrderPaySuccess
 {
@@ -23,6 +23,15 @@ class OrderPaySuccess
         \Log::info('OrderPaySuccess_handle:trade_no:'.$trade_no.' transaction_id:'.$transaction_id);
 
         if(is_empty($order)){
+            \Log::info('OrderPaySuccess_handle_error:not find by read node:trade_no:'.$trade_no.' transaction_id:'.$transaction_id);
+            $appEnv = env('APP_ENV', 'production');
+            $date = date("Y-m-d H:i:s");
+            $msg = <<<EOF
+项目:quick_app [$appEnv]
+报错时间:$date
+报错信息:- 支付回调在读库查找失败-trade_no: $trade_no;transaction_id:$transaction_id
+EOF;
+            sendNotice($msg);
             $order= Order::onWriteConnection()->where('trade_no', $trade_no)->first();
         }