Fix order

This commit is contained in:
Ibnu Maksum 2023-08-16 13:41:34 +07:00
parent 9c35962264
commit 455ce90a45
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -122,16 +122,16 @@ switch ($action) {
run_hook('customer_buy_plan'); #HOOK run_hook('customer_buy_plan'); #HOOK
include 'system/paymentgateway/' . $config['payment_gateway'] . '.php'; include 'system/paymentgateway/' . $config['payment_gateway'] . '.php';
call_user_func($config['payment_gateway'] . '_validate_config'); call_user_func($config['payment_gateway'] . '_validate_config');
if ($routes['2'] != '0') { if ($routes['2']>0) {
$router = ORM::for_table('tbl_routers')->where('enabled', '1')->find_one($routes['2']); $router = ORM::for_table('tbl_routers')->where('enabled', '1')->find_one($routes['2']);
if (empty($router) || empty($plan)) {
r2(U . $back, 'e', Lang::T("Plan Not found"));
}
}else{ }else{
$router['id'] = 0; $router['id'] = 0;
$router['name'] = 'balance'; $router['name'] = 'balance';
} }
$plan = ORM::for_table('tbl_plans')->where('enabled', '1')->find_one($routes['3']); $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"));
}
$d = ORM::for_table('tbl_payment_gateway') $d = ORM::for_table('tbl_payment_gateway')
->where('username', $user['username']) ->where('username', $user['username'])
->where('status', 1) ->where('status', 1)