This commit is contained in:
root 2019-11-24 23:59:13 +08:00
parent 8f08c4bb83
commit f886465d8e

View File

@ -73,7 +73,7 @@ class OrderController extends Controller
$order->total_amount = $plan[$request->input('cycle')];
if ($user->expired_at > time() && $order->plan_id !== $user->plan_id) {
$order->type = 3;
if (!(int)config('v2board.plan_is_update')) abort(500, '目前不允许更改订阅,请联系管理员');
if (!(int)config('v2board.plan_is_update', 1)) abort(500, '目前不允许更改订阅,请联系管理员');
$order->total_amount = $order->total_amount + ((($user->expired_at - time()) / 86400) * config('v2board.plan_update_fee', 0.5) * 100);
} else if ($user->expired_at > time() && $order->plan_id == $user->plan_id) {
$order->type = 2;