diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index a739dbf12..86a6910f0 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -30,6 +30,7 @@ use app\common\model\user_sign\UserSign; use app\common\model\vip_flow\VipFlow; use app\common\service\Curl; use app\common\service\PushService; +use support\exception\BusinessException; use support\Log; use think\facade\Db; use Webman\RedisQueue\Redis; @@ -52,7 +53,8 @@ class PayNotifyLogic extends BaseLogic } catch (\Exception $e) { Db::rollback(); Log::error('支付回调处理失败' . $e->getMessage() . ',lien:' . $e->getLine() . ',file:' . $e->getFile()); - throw new \Exception($e->getMessage()); + throw new BusinessException($e->getMessage()); + } } @@ -70,13 +72,13 @@ class PayNotifyLogic extends BaseLogic $order = StoreOrder::where('order_id', $orderSn)->findOrEmpty(); $user = User::where('id', $order['uid'])->find(); if ($user['now_money'] < $order['pay_price']) { - throw new \Exception('余额不足'); + throw new BusinessException('余额不足'); } // $order->money = $order['pay_price']; $order->paid = 1; $order->pay_time = time(); if (!$order->save()) { - throw new \Exception('订单保存出错'); + throw new BusinessException('订单保存出错'); } if ($order['is_storage'] == 1) { $order->status = 2;