From e31aeca2dd315926507f268bddc6e134dcb54792 Mon Sep 17 00:00:00 2001 From: AGSTR <144728914+agstrxyz@users.noreply.github.com> Date: Mon, 26 Aug 2024 19:15:40 +0700 Subject: [PATCH 1/2] Update order.php fix gagal beli voucher paket radius rest --- system/controllers/order.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/controllers/order.php b/system/controllers/order.php index 19aae154..144b44aa 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -205,7 +205,7 @@ switch ($action) { if (!$plan['enabled']) { r2(U . "home", 'e', 'Plan is not exists'); } - if ($routes['2'] == 'radius') { + if ($plan['is_radius'] == '1') { $router_name = 'radius'; } else { $router_name = $plan['routers']; From 1a70e2232c33b23c14277074fa6b12067237ac5c Mon Sep 17 00:00:00 2001 From: AGSTR <144728914+agstrxyz@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:09:45 +0700 Subject: [PATCH 2/2] Update order.php --- system/controllers/order.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/controllers/order.php b/system/controllers/order.php index 144b44aa..0d4b2a3c 100644 --- a/system/controllers/order.php +++ b/system/controllers/order.php @@ -436,8 +436,9 @@ switch ($action) { run_hook('customer_buy_plan'); #HOOK include $PAYMENTGATEWAY_PATH . DIRECTORY_SEPARATOR . $gateway . '.php'; call_user_func($gateway . '_validate_config'); - - if ($routes['2'] == 'radius') { + + $plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']); + if ($plan['is_radius'] == '1') { $router['id'] = 0; $router['name'] = 'radius'; } else if ($routes['2'] > 0) { @@ -446,7 +447,6 @@ switch ($action) { $router['id'] = 0; $router['name'] = 'balance'; } - $plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']); if (empty($router) || empty($plan)) { r2(U . "order/package", 'e', Lang::T("Plan Not found")); }