moonsflyer 3 mēneši atpakaļ
vecāks
revīzija
bb46db6818
1 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. 6 2
      app/common/logic/PayNotifyLogic.php

+ 6 - 2
app/common/logic/PayNotifyLogic.php

@@ -82,8 +82,12 @@ class PayNotifyLogic extends BaseLogic
     {
         $order = Order::with(['order_goods'])->where(['sn' => $orderSn])->findOrEmpty();
         outFileLog($order,'prepay','$order');
-        // 汽泡足迹
-        event('Footprint', ['type' => FootprintEnum::ORDER_SETTLEMENT, 'user_id' => $order['user_id']]);
+        // 汽泡足迹(异常不影响订单事务)
+        try {
+            event('Footprint', ['type' => FootprintEnum::ORDER_SETTLEMENT, 'user_id' => $order['user_id']]);
+        } catch (\Throwable $e) {
+            Log::write($e->__toString(), 'FootprintError');
+        }
 
         //增加用户累计消费额度
         User::where(['id' => $order['user_id']])