diff --git a/app/Http/Controllers/User/OrderController.php b/app/Http/Controllers/User/OrderController.php index f648cd8f..e38099b8 100755 --- a/app/Http/Controllers/User/OrderController.php +++ b/app/Http/Controllers/User/OrderController.php @@ -87,8 +87,12 @@ class OrderController extends Controller } if ($request->input('period') === 'reset_price') { - if ($user->expired_at <= time() || !$user->plan_id) { + if (!$user->plan_id) { abort(500, __('Subscription has expired or no active subscription, unable to purchase Data Reset Package')); + } else { + if ($user->plan_id !== $request->input('plan_id')) { + abort(500, __('This subscription reset package does not apply to your subscription')); + } } } diff --git a/resources/lang/en-US.json b/resources/lang/en-US.json index afe34317..1cbe6bb6 100644 --- a/resources/lang/en-US.json +++ b/resources/lang/en-US.json @@ -89,5 +89,6 @@ "The coupon code cannot be used for this period": "The coupon code cannot be used for this period", "Request failed, please try again later": "Request failed, please try again later", "Register frequently, please try again after 1 hour": "Register frequently, please try again after 1 hour", - "Uh-oh, we've had some problems, we're working on it.": "Uh-oh, we've had some problems, we're working on it." + "Uh-oh, we've had some problems, we're working on it.": "Uh-oh, we've had some problems, we're working on it", + "This subscription reset package does not apply to your subscription": "This subscription reset package does not apply to your subscription" } diff --git a/resources/lang/zh-CN.json b/resources/lang/zh-CN.json index c839a982..c80d2f8b 100644 --- a/resources/lang/zh-CN.json +++ b/resources/lang/zh-CN.json @@ -89,5 +89,6 @@ "The coupon code cannot be used for this period": "此优惠券无法用于该付款周期", "Request failed, please try again later": "请求失败,请稍后再试", "Register frequently, please try again after 1 hour": "注册频繁,请等待1小时后再次尝试", - "Uh-oh, we've had some problems, we're working on it.": "遇到了些问题,我们正在进行处理" + "Uh-oh, we've had some problems, we're working on it.": "遇到了些问题,我们正在进行处理", + "This subscription reset package does not apply to your subscription": "该订阅重置包不适用于你的订阅" }