public static function execute(ApplicationAbstract $application) { $data = osc_sanitize_string(basename($_GET['code'])); if (PaymentModules::uninstall($data)) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } osc_redirect_admin(OSCOM::getLink()); }
public static function execute(ApplicationAbstract $application) { $data = array('configuration' => $_POST['configuration']); if (PaymentModules::save($data)) { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } OSCOM::redirect(OSCOM::getLink()); }
public static function execute(ApplicationAbstract $application) { $data = HTML::sanitize(basename($_GET['code'])); if (PaymentModules::install($data)) { OSCOM::redirect(OSCOM::getLink(null, null, 'Save&code=' . $_GET['code'])); } else { Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error'); OSCOM::redirect(OSCOM::getLink()); } }
public static function execute($search) { $modules = PaymentModules::getUninstalled(); $result = array('entries' => array()); foreach ($modules['entries'] as $module) { if (stripos($module['code'], $search) !== false || stripos($module['title'], $search) !== false) { $result['entries'][] = $module; } } $result['total'] = count($result['entries']); return $result; }
public static function execute() { if (!isset($_GET['search'])) { $_GET['search'] = ''; } if (!empty($_GET['search'])) { $result = PaymentModules::findUninstalled($_GET['search']); } else { $result = PaymentModules::getUninstalled(); } $result['rpcStatus'] = RPC::STATUS_SUCCESS; echo json_encode($result); }
public static function execute() { $OSCOM_Language = Registry::get('Language'); $installed_modules = PaymentModules::getInstalled(); $installed = array(); foreach ($installed_modules['entries'] as $module) { $installed[] = $module['code']; } $result = array('entries' => array()); $DLpm = new DirectoryListing(OSCOM::BASE_DIRECTORY . 'Core/Site/Admin/Module/Payment'); $DLpm->setIncludeDirectories(false); foreach ($DLpm->getFiles() as $file) { $module = substr($file['name'], 0, strrpos($file['name'], '.')); if (!in_array($module, $installed)) { $class = 'osCommerce\\OM\\Core\\Site\\Admin\\Module\\Payment\\' . $module; $OSCOM_Language->injectDefinitions('modules/payment/' . $module . '.xml'); $OSCOM_PM = new $class(); $result['entries'][] = array('code' => $OSCOM_PM->getCode(), 'title' => $OSCOM_PM->getTitle(), 'sort_order' => $OSCOM_PM->getSortOrder(), 'status' => $OSCOM_PM->isEnabled()); } } $result['total'] = count($result['entries']); return $result; }
<?php /** * osCommerce Online Merchant * * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com * @license BSD License; http://www.oscommerce.com/bsdlicense.txt */ use osCommerce\OM\Core\HTML; use osCommerce\OM\Core\ObjectInfo; use osCommerce\OM\Core\OSCOM; use osCommerce\OM\Core\Site\Admin\Application\Configuration\Configuration; use osCommerce\OM\Core\Site\Admin\Application\PaymentModules\PaymentModules; $OSCOM_ObjectInfo = new ObjectInfo(PaymentModules::get($_GET['code'])); ?> <h1><?php echo $OSCOM_Template->getIcon(32) . HTML::link(OSCOM::getLink(), $OSCOM_Template->getPageTitle()); ?> </h1> <?php if ($OSCOM_MessageStack->exists()) { echo $OSCOM_MessageStack->get(); } ?> <div class="infoBox"> <h3><?php echo HTML::icon('edit.png') . ' ' . $OSCOM_ObjectInfo->getProtected('title'); ?>