diff --git a/app/Services/OrderService.php b/app/Services/OrderService.php index 30f88394..48dce7b8 100644 --- a/app/Services/OrderService.php +++ b/app/Services/OrderService.php @@ -170,6 +170,7 @@ class OrderService ->first(); if (!$lastOneTimeOrder) return; $plan = Plan::find($lastOneTimeOrder->plan_id); + if (!$plan) return; $trafficUnitPrice = $plan->onetime_price / $plan->transfer_enable; if ($user->discount && $trafficUnitPrice) { $trafficUnitPrice = $trafficUnitPrice - ($trafficUnitPrice * $user->discount / 100);