浏览代码

Merge pull request #230 from 1day2die/fix_SERVER_LIMIT_REWARD_

Fix server limit reward
AVMG 3 年之前
父节点
当前提交
d71bc134fb
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      app/Http/Controllers/Admin/PaymentController.php

+ 4 - 4
app/Http/Controllers/Admin/PaymentController.php

@@ -141,12 +141,12 @@ class PaymentController extends Controller
                 $user->increment('credits', $paypalProduct->quantity);
                 $user->increment('credits', $paypalProduct->quantity);
 
 
                 //update server limit
                 //update server limit
-                if (Configuration::getValueByKey('SERVER_LIMIT_AFTER_IRL_PURCHASE', 10) !== 0) {
-                    if ($user->server_limit < Configuration::getValueByKey('SERVER_LIMIT_AFTER_IRL_PURCHASE', 10)) {
-                        $user->update(['server_limit' => 10]);
+                if (Configuration::getValueByKey('SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) {
+                    if ($user->server_limit < Configuration::getValueByKey('SERVER_LIMIT_AFTER_IRL_PURCHASE')) {
+                        $user->update(['server_limit' => Configuration::getValueByKey('SERVER_LIMIT_AFTER_IRL_PURCHASE')]);
                     }
                     }
                 }
                 }
-
+                
                 //update role
                 //update role
                 if ($user->role == 'member') {
                 if ($user->role == 'member') {
                     $user->update(['role' => 'client']);
                     $user->update(['role' => 'client']);