moonsflyer 3 달 전
부모
커밋
bb46db6818
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  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']])