public function remove() { $paymentmodules = PaymentModules::find_by_module_key($this->module_key); $paymentmodules->enabled = 'N'; $payment_module_id = $paymentmodules->id; $paymentmodules->save(); PaymentConfig::delete_payment_config($this->module_key); }
} else { } } } $packageinvoice->id = $invoice_id; $packageinvoice->delete_inactive_invoice(); $found_invoice = PackageInvoice::find_by_id($invoice_id); if (!$found_invoice) { redirect_to(BASE_URL . "employer/credits/"); } $smarty->assign('found_invoice', $found_invoice); } else { redirect_to(BASE_URL . "employer/credits/"); } //payment_method.tpl $PaymentModules = PaymentModules::find_all_active(); if ($PaymentModules) { $i = 1; $manage_lists = array(); foreach ($PaymentModules as $row) { $manage_lists[$i]['id'] = $row->id; $manage_lists[$i]['name'] = $row->name; $manage_lists[$i]['module_key'] = $row->module_key; $manage_lists[$i]['enabled'] = $row->enabled; $i++; } $smarty->assign('payment_modules', $manage_lists); } $smarty->assign('dont_include_left', true); $html_title = SITE_NAME . " - " . format_lang("page_title", 'Confirmorder'); $smarty->assign('package_id', $_REQUEST['package_id']);
if ($_GET['install']) { $payment = $_GET['install']; require '../modules/payment/' . $payment . '.php'; $payment_module =& new $payment(); $payment_module->install(); redirect_to(BASE_URL . "admin/payment_modules.php"); die; } elseif ($_GET['remove']) { $payment = $_GET['remove']; require '../modules/payment/' . $payment . '.php'; $payment_module =& new $payment(); $payment_module->remove(); redirect_to(BASE_URL . "admin/payment_modules.php"); die; } $PaymentModules = PaymentModules::find_all(); if ($PaymentModules) { $i = 1; $manage_lists = array(); foreach ($PaymentModules as $row) { $manage_lists[$i]['id'] = $row->id; $manage_lists[$i]['name'] = $row->name; $manage_lists[$i]['module_key'] = $row->module_key; $manage_lists[$i]['enabled'] = $row->enabled; $i++; } $smarty->assign('payment_modules', $manage_lists); } $html_title = SITE_NAME . " - Payment Modules "; $smarty->assign('lang', $lang); $smarty->assign('message', $message);