update: order

This commit is contained in:
Tokumeikoi 2020-11-07 17:23:47 +08:00
parent 7042dce0a1
commit 9345bf7979

View File

@ -78,7 +78,7 @@ class OrderController extends Controller
if ((!$plan->show && !$plan->renew) || (!$plan->show && $user->plan_id !== $plan->id)) {
if ($request->input('cycle') !== 'reset_price') {
abort(500, '该订阅已售罄');
abort(500, '该订阅已售罄,请更换其他订阅');
}
}
@ -96,6 +96,10 @@ class OrderController extends Controller
}
}
if (!$plan->show && $plan->renew && !$userService->isAvailable($user)) {
abort(500, '订阅已过期,无法续费该订阅');
}
DB::beginTransaction();
$order = new Order();
$orderService = new OrderService($order);