update: reset package

This commit is contained in:
tokumeikoi 2022-07-29 13:46:29 +08:00
parent 763efef9df
commit 3fdd6ac30c
2 changed files with 2 additions and 6 deletions

View File

@ -94,12 +94,8 @@ class OrderController extends Controller
} }
if ($request->input('period') === 'reset_price') { if ($request->input('period') === 'reset_price') {
if (!$user->plan_id || $user->expired_at < time() || $user->expired_at !== NULL) { if (!$userService->isAvailable($user) || $plan->id !== $user->plan_id) {
abort(500, __('Subscription has expired or no active subscription, unable to purchase Data Reset Package')); abort(500, __('Subscription has expired or no active subscription, unable to purchase Data Reset Package'));
} else {
if ($user->plan_id !== $plan->id) {
abort(500, __('This subscription reset package does not apply to your subscription'));
}
} }
} }

File diff suppressed because one or more lines are too long