/** * @return boolean */ public function install() { if (Shop::isFeatureActive()) { Shop::setContext(Shop::CONTEXT_ALL); } // Install invisible tab $tab = new Tab(); $tab->name[$this->context->language->id] = $this->l('SecurionPay'); $tab->class_name = 'AdminSecurionPay'; $tab->id_parent = -1; // No parent tab $tab->module = $this->name; $tab->add(); //Init Configuration::updateValue('SECURIONPAY_CONF', ''); if (!parent::install()) { return false; } if (!Configuration::updateValue(self::MODE, self::MODE_TEST)) { return false; } if (!$this->registerHook('payment') || !$this->registerHook('displayAdminOrder')) { return false; } return true; }
public function install() { if (!parent::install() || !Configuration::updateValue('ALLIEDWALLET_MERCHANT_ID', '') || !Configuration::updateValue('ALLIEDWALLET_SITE_ID', '') || !Configuration::updateValue('ALLIEDWALLET_CONFIRM_PAGE', 'http://' . Tools::safeOutput($_SERVER['HTTP_HOST']) . __PS_BASE_URI__ . 'modules/alliedwallet/validation.php') || !Configuration::updateValue('ALLIEDWALLET_RETURN_PAGE', 'http://' . Tools::safeOutput($_SERVER['HTTP_HOST']) . __PS_BASE_URI__ . 'history.php') || !$this->registerHook('payment')) { return false; } return true; }
public function install() { if (!parent::install() or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) { return false; } return true; }
public function install() { Configuration::updateValue('HIPAY_SALT', uniqid()); if (!Configuration::get('HIPAY_UNIQID')) { Configuration::updateValue('HIPAY_UNIQID', uniqid()); } if (!Configuration::get('HIPAY_RATING')) { Configuration::updateValue('HIPAY_RATING', 'ALL'); } if (!(parent::install() && $this->registerHook('payment') && $this->registerHook('displayPaymentEU') && $this->registerHook('paymentReturn') && $this->_createAuthorizationOrderState())) { return false; } if (_PS_VERSION_ >= '1.5' && !$this->registerHook('displayBackOfficeHeader')) { return false; } $result = Db::getInstance()->ExecuteS(' SELECT `id_zone`, `name` FROM `' . _DB_PREFIX_ . 'zone` WHERE `active` = 1 '); foreach ($result as $rowNumber => $rowValues) { Configuration::deleteByName('HIPAY_AZ_' . $rowValues['id_zone']); Configuration::deleteByName('HIPAY_AZ_ALL_' . $rowValues['id_zone']); } Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'module_country` WHERE `id_module` = ' . (int) $this->id); return true; }
public function install() { Configuration::updateValue('HIPAY_SALT', uniqid()); // Force using Prod mod Configuration::updateValue('HIPAY_PROD', 1); if (!Configuration::get('HIPAY_UNIQID')) { Configuration::updateValue('HIPAY_UNIQID', uniqid()); } if (!Configuration::get('HIPAY_RATING')) { Configuration::updateValue('HIPAY_RATING', 'ALL'); } if (!(parent::install() and $this->registerHook('payment'))) { return false; } $result = Db::getInstance()->ExecuteS(' SELECT `id_zone`, `name` FROM `' . _DB_PREFIX_ . 'zone` WHERE `active` = 1 '); foreach ($result as $rowNumber => $rowValues) { Configuration::deleteByName('HIPAY_AZ_' . $rowValues['id_zone']); Configuration::deleteByName('HIPAY_AZ_ALL_' . $rowValues['id_zone']); } Db::getInstance()->Execute('DELETE FROM `' . _DB_PREFIX_ . 'module_country` WHERE `id_module` = ' . (int) $this->id); return true; }
public function install() { if (!parent::install() || !$this->registerHook('displayPayment') || !$this->registerHook('paymentReturn') || !$this->registerHook('displayFooter') || !$this->registerHook('displayHeader') || !$this->registerHook('ModuleRoutes') || !$this->registerHook('displayOrderConfirmation') || !$this->registerHook('displayAdminOrder') || !$this->registerHook('actionOrderStatusUpdate')) { return false; } $status = array('DELIVERY' => array('name' => 'YA Ждёт отправки', 'color' => '#8A2BE2', 'id' => 900, 'paid' => true, 'shipped' => false, 'logable' => true, 'delivery' => true), 'CANCELLED' => array('name' => 'YA Отменен', 'color' => '#b70038', 'id' => 901, 'paid' => false, 'shipped' => false, 'logable' => true, 'delivery' => false), 'PICKUP' => array('name' => 'YA В пункте самовывоза', 'color' => '#cd98ff', 'id' => 902, 'paid' => true, 'shipped' => true, 'logable' => true, 'delivery' => true), 'PROCESSING' => array('name' => 'YA В процессе подготовки', 'color' => '#FF8C00', 'id' => 903, 'paid' => true, 'shipped' => false, 'logable' => false, 'delivery' => true), 'DELIVERED' => array('name' => 'YA Доставлен', 'color' => '#108510', 'id' => 904, 'paid' => true, 'shipped' => true, 'logable' => true, 'delivery' => true), 'UNPAID' => array('name' => 'YA Не оплачен', 'color' => '#ff1c30', 'id' => 905, 'paid' => false, 'shipped' => false, 'logable' => false, 'delivery' => false), 'RESERVATION_EXPIRED' => array('name' => 'YA Резерв отменён', 'color' => '#ff2110', 'id' => 906, 'paid' => false, 'shipped' => false, 'logable' => false, 'delivery' => false), 'RESERVATION' => array('name' => 'YA Резерв', 'color' => '#0f00d3', 'id' => 907, 'paid' => false, 'shipped' => false, 'logable' => false, 'delivery' => false)); foreach ($status as $s) { $os = new OrderState((int) $s['id']); $os->id = $s['id']; $os->force_id = true; $os->name = $this->multiLangField($s['name']); $os->color = $s['color']; $os->module_name = $this->name; $os->paid = $s['paid']; $os->logable = $s['logable']; $os->shipped = $s['shipped']; $os->delivery = $s['delivery']; $os->add(); } $sql = array(); $sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'pokupki_orders` ( `id_order` int(10) NOT NULL, `id_market_order` varchar(100) NOT NULL, `currency` varchar(100) NOT NULL, `ptype` varchar(100) NOT NULL, `home` varchar(100) NOT NULL, `pmethod` varchar(100) NOT NULL, `outlet` varchar(100) NOT NULL, PRIMARY KEY (`id_order`,`id_market_order`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci'; $sql[] = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'mws_return` ( `id_return` int(10) NOT NULL AUTO_INCREMENT, `invoice_id` varchar(128) NOT NULL, `cause` varchar(256) NOT NULL, `amount` DECIMAL(10,2) NOT NULL, `request` varchar(1024) NOT NULL, `response` varchar(1024) NOT NULL, `status` varchar(1024) NOT NULL, `error` varchar(1024) NOT NULL, `date` datetime NOT NULL, PRIMARY KEY (`id_return`,`invoice_id`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci'; foreach ($sql as $qr) { Db::getInstance()->execute($qr); } $customer = new Customer(); $customer->firstname = 'YA POKUPKI Not Delete'; $customer->lastname = 'YA POKUPKI Not Delete'; $customer->email = '*****@*****.**'; $customer->passwd = Tools::encrypt('OPC123456dmo'); $customer->newsletter = 1; $customer->optin = 1; $customer->active = 0; $customer->add(); Configuration::updateValue('YA_POKUPKI_CUSTOMER', $customer->id); Configuration::updateValue('YA_ORG_INSIDE', 1); return true; }
public function install() { require_once dirname(__FILE__) . '/swish_install.php'; $swish_install = new SwishInstall(); $swish_install->createTable(); return parent::install() && $this->registerHook('payment') && $this->registerHook('displayLeftColumn') && $this->registerHook('paymentReturn') && $this->registerHook('header'); }
public function install() { if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn') || !$this->registerHook('leftColumn') || !$this->registerHook('header') || !Configuration::updateValue('INSTAMOJO', 'instant payments')) { return false; } return true; }
public function install() { if (parent::install()) { Configuration::updateValue('PayTM_MERCHANT_ID', ''); Configuration::updateValue('PayTM_SECRET_KEY', ''); Configuration::updateValue('PayTM_MODE', ''); Configuration::updateValue('PayTM_GATEWAY_URL', ''); Configuration::updateValue('PayTM_MERCHANT_INDUSTRY_TYPE', ''); Configuration::updateValue('PayTM_MERCHANT_CHANNEL_ID', ''); Configuration::updateValue('PayTM_MERCHANT_WEBSITE', ''); Configuration::updateValue('PayTM_ENABLE_CALLBACK', ''); $this->registerHook('payment'); $this->registerHook('PaymentReturn'); $this->registerHook('ShoppingCartExtra'); if (!Configuration::get('Paytm_ORDER_STATE')) { $this->setPaytmOrderState('Paytm_ID_ORDER_SUCCESS', 'Payment Received', '#b5eaaa'); $this->setPaytmOrderState('Paytm_ID_ORDER_FAILED', 'Payment Failed', '#E77471'); $this->setPaytmOrderState('Paytm_ID_ORDER_PENDING', 'Payment Pending', '#F4E6C9'); Configuration::updateValue('Paytm_ORDER_STATE', '1'); } return true; } else { return false; } }
public function install() { if (!parent::install() || !$this->createTransactionTable() || !Configuration::updateValue('PAYNL_TOKEN', '') || !Configuration::updateValue('PAYNL_SERVICE_ID', '') || !Configuration::updateValue('PAYNL_ORDER_DESC', '') || !Configuration::updateValue('PAYNL_WAIT', '10') || !Configuration::updateValue('PAYNL_SUCCESS', '2') || !Configuration::updateValue('PAYNL_AMOUNTNOTVALID', '0') || !Configuration::updateValue('PAYNL_CANCEL', '6') || !Configuration::updateValue('PAYNL_COUNTRY_EXCEPTIONS', '') || !Configuration::updateValue('PAYNL_PAYMENT_METHOD_ORDER', '') || !$this->registerHook('paymentReturn') || !$this->registerHook('payment')) { return false; } return true; }
public function install() { if (!parent::install() or !Configuration::updateValue('ipay88_merchantCode', '') or !Configuration::updateValue('ipay88_merchantKey', '') or !Configuration::updateValue('IPAY88_URL', 1) or !$this->registerHook('payment')) { return false; } return true; }
public function install() { if (!parent::install() or !Configuration::updateValue('ECARD_MERCHANTID', '2729393') or !Configuration::updateValue('ECARD_PASS', 'e1c2a3') or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) { return false; } return true; }
public function install() { return parent::install() && Configuration::updateValue('PAYMENTSENSE_GATEWAYID', '') && Configuration::updateValue('PAYMENTSENSE_GATEWAYPASS', '') && Configuration::updateValue('PAYMENTSENSE_PSK', '') && Configuration::updateValue('PAYMENTSENSE_DEBUG', '') && Configuration::updateValue('PAYMENTSENSE_TRANSACTION_TYPE', '') && $this->registerHook('payment') && $this->registerHook('paymentReturn'); /* Blank line to retain line numbers in changelog*/ /* Blank line to retain line numbers in changelog*/ /* Blank line to retain line numbers in changelog*/ }
/** * Installing module through the backend * * @return bool */ function install() { // Use parent installing method first if (parent::install()) { // Register hooks $this->registerHook('payment'); $this->registerHook('paymentReturn'); // Get configuration fields $fields = $this->getConfFields(); // Check if all configuration fields can be updated // and clear previous values foreach ($fields as $field) { $confField = strtoupper($field); if (!Configuration::updateValue($confField, '')) { return false; } } // Define order status for successful payment Configuration::updateValue('_SU_OS_OK_', 2); // Define order status for errors during the order process Configuration::updateValue('_SU_OS_ERROR_', 8); // Installation complete return true; } return false; }
/** * Perform instalation of PagSeguro module * * @return boolean */ public function install() { if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('paymentReturn') || !Configuration::updateValue('PAGSEGURO_EMAIL', '') || !Configuration::updateValue('PAGSEGURO_TOKEN', '') || !Configuration::updateValue('PAGSEGURO_URL_REDIRECT', '') || !Configuration::updateValue('PAGSEGURO_NOTIFICATION_URL', '') || !Configuration::updateValue('PAGSEGURO_CHARSET', PagSeguroConfig::getData('application', 'charset')) || !Configuration::updateValue('PAGSEGURO_LOG_ACTIVE', PagSeguroConfig::getData('log', 'active')) || !Configuration::updateValue('PAGSEGURO_LOG_FILELOCATION', PagSeguroConfig::getData('log', 'fileLocation')) || !Configuration::updateValue('PS_OS_PAGSEGURO', 0) || !$this->_generatePagSeguroOrderStatus()) { return false; } return true; }
public function install() { if (!defined('_IS_AGILE_DEV_') && !empty(self::$_newfiles) && !Tools::getValue("redirected")) { $adminfolder = AgileInstaller::detect_admin_folder($_SERVER['SCRIPT_FILENAME']); AgileInstaller::install_newfiles(self::$_newfiles, $this->name, $adminfolder, 2); $result = AgileInstaller::install_health_check(self::$_newfiles, $this->name, $adminfolder); if (!empty($result)) { $this->_errors[] = '<a target="agile" style="text-decoration:underline;color:blue;" href="http://addons-modules.com/store/en/content/36-agile-module-installation-tips">' . $this->getL('Failed to update files due to permission issue, please visit here for more instructions.') . '</a>'; return false; } Tools::redirectAdmin("./index.php?controller=AdminModules&token=" . Tools::getValue("token") . "&install=" . $this->name . "&tab_module=" . $this->tab . " &module_name=" . $this->name . "&anchor=anchor" . $this->name . "&redirected=1"); } $reterrs = AgileInstaller::CanModuleOverride($this->name); if (!empty($reterrs)) { $this->_errors = array_merge($this->_errors, $reterrs); return false; } $reterrs = AgileInstaller::version_depencies($this->version_dependencies); if (!empty($reterrs)) { $this->_errors = array_merge($this->_errors, $reterrs); return false; } if (!AgileInstaller::sql_install(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) { return false; } if (!parent::install() or !Configuration::updateValue('AGILE_PAYPAL_BUSINESS', '*****@*****.**') or !Configuration::updateValue('AGILE_PAYPAL_SANDBOX', 1) or !Configuration::updateValue('AGILE_PAYPAL_FORCE_SUMMARY', '1') or !Configuration::updateValue('AGILE_PAYPAL_HIDE_COUNTRY', 0) or !Configuration::updateValue('AGILE_PAYPAL_HIDE_CARRIER', 0) or !Configuration::updateValue('AGILE_PAYPAL_HIDE_TERMS', 0) or !Configuration::updateValue('AGILE_PAYPAL_HEADER', '') or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_PAYMENT', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_DAILY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_WEEKLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_MONTHLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_YEARLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_SUPPORT_SELLERS', 0) or !Configuration::updateValue('AGILE_PAYPAL_BUSINESS2', '') or !Configuration::updateValue('AGILE_PAYPAL_MICRO_AMOUNT', 0) or !Configuration::updateValue('AGILE_PAYPAL_EXPRESS_ENABLED', 1) or !Configuration::updateValue('AGILE_PAYPAL_AM_INTEGRATED', 0) or !Configuration::updateValue('AGILE_PAYPAL_AM_SHOW_CHOICE', 0) or !Configuration::updateValue('AGILE_PAYPAL_AM_NO_MIX_PRODUCT', 0) or !Configuration::updateValue('AGILE_PAYPAL_SUBSCRIBE_ONLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_CURRENCY', Configuration::get('PS_CURRENCY_DEFAULT')) or !$this->registerHook('agileexpresscheckout') or !$this->registerHook('displayShoppingCartFooter') or !$this->registerHook('displayProductButtons') or !$this->registerHook('displayPayment') or !$this->registerHook('displayPaymentReturn') or !$this->registerHook('displayFooter')) { return false; } if (version_compare(_PS_VERSION_, '1.5', '>=')) { Autoload::getInstance()->generateIndex(); } return true; }
public function install() { if (!parent::install() or !Configuration::updateValue('PAYPAL_BUSINESS', '*****@*****.**') or !Configuration::updateValue('PAYPAL_SANDBOX', 1) or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) { return false; } return true; }
public function install() { if (version_compare(PagSeguroLibrary::getVersion(), '2.1.8', '<=')) { if (!$this->validatePagSeguroRequirements()) { return false; } } if (!$this->validatePagSeguroId()) { return false; } if (!$this->validateOrderMessage()) { return false; } if (!$this->generatePagSeguroOrderStatus()) { return false; } if (!$this->createTables()) { return false; } if (!$this->modulo->installConfiguration()) { return false; } if (!parent::install() or !$this->registerHook('payment') or !$this->registerHook('paymentReturn') or !Configuration::updateValue('PAGSEGURO_EMAIL', '') or !Configuration::updateValue('PAGSEGURO_TOKEN', '') or !Configuration::updateValue('PAGSEGURO_URL_REDIRECT', '') or !Configuration::updateValue('PAGSEGURO_NOTIFICATION_URL', '') or !Configuration::updateValue('PAGSEGURO_CHARSET', PagSeguroConfig::getData('application', 'charset')) or !Configuration::updateValue('PAGSEGURO_LOG_ACTIVE', PagSeguroConfig::getData('log', 'active')) or !Configuration::updateValue('PAGSEGURO_RECOVERY_ACTIVE', false) or !Configuration::updateValue('PAGSEGURO_CHECKOUT', false) or !Configuration::updateValue('PAGSEGURO_LOG_FILELOCATION', PagSeguroConfig::getData('log', 'fileLocation'))) { return false; } return true; }
public function install() { if (!parent::install() or !Configuration::updateValue('CCAVENUE_MERCHANT_ID', '') or !Configuration::updateValue('CCAVENUE_ACCESS_CODE', '') or !Configuration::updateValue('CCAVENUE_ENCRYPTION_KEY', '') or !Configuration::updateValue('CCAVENUE_SHIPPING', 1) or !Configuration::updateValue('CCAVENUE_TITLE', 'CCAvenue MCPG') or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) { return false; } return true; }
public function install() { if (!parent::install() or !$this->createPaymentcardtbl() or !$this->registerHook('invoice') or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) { return false; } return true; }
public function install() { if (Tools::getValue('redirect') == "config") { return parent::install() && $this->registerHook('payment') && $this->registerHook('paymentReturn'); } return parent::install() && $this->registerHook('payment') && $this->registerHook('paymentReturn') && $this->generateKeyPair(); }
/** * Install module * * @see PaymentModule::install() */ public function install() { if (!parent::install() || !Configuration::updateValue('SOFORTBANKING_USER_ID', '') || !Configuration::updateValue('SOFORTBANKING_PROJECT_ID', '') || !Configuration::updateValue('SOFORTBANKING_PROJECT_PW', '') || !Configuration::updateValue('SOFORTBANKING_NOTIFY_PW', '') || !Configuration::updateValue('SOFORTBANKING_BLOCK_LOGO', 'Y') || !Configuration::updateValue('SOFORTBANKING_CPROTECT', 'N') || !Configuration::updateValue('SOFORTBANKING_OS_ERROR', 8) || !Configuration::updateValue('SOFORTBANKING_OS_ACCEPTED', 2) || !Configuration::updateValue('SOFORTBANKING_REDIRECT', 'N') || !$this->registerHook('payment') || !$this->registerHook('paymentReturn') || !$this->registerHook('leftColumn')) { return false; } return true; }
/** * Install the plugin * */ public function install() { if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('header') || !$this->registerHook('backOfficeHeader') || !$this->registerHook('paymentReturn') || !$this->registerHook('myAccountBlock') || !$this->registerHook('customerAccount') || !$this->_installdb() || !$this->_initConfiguration()) { return false; } return true; }
public function install() { Db::getInstance()->Execute('CREATE TABLE `' . _DB_PREFIX_ . 'universalpay_system` ( `id_universalpay_system` INT(10) NOT NULL AUTO_INCREMENT, `id_order_state` INT( 10 ) NOT NULL DEFAULT \'' . Configuration::get('PS_OS_PREPARATION') . '\', `active` TINYINT(1) UNSIGNED NOT NULL DEFAULT \'0\', `position` INT(10) UNSIGNED NOT NULL DEFAULT \'0\', `date_add` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `date_upd` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id_universalpay_system`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); Db::getInstance()->Execute('CREATE TABLE `' . _DB_PREFIX_ . 'universalpay_system_lang` ( `id_universalpay_system` INT(10) UNSIGNED NOT NULL, `id_lang` INT(10) UNSIGNED NOT NULL, `name` VARCHAR(128) NOT NULL, `description_short` VARCHAR(255) NOT NULL, `description` TEXT NULL, `description_success` TEXT NULL, UNIQUE INDEX `universalpay_system_lang_index` (`id_universalpay_system`, `id_lang`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); Db::getInstance()->Execute('CREATE TABLE `' . _DB_PREFIX_ . 'universalpay_system_carrier` ( `id_universalpay_system` int(10) unsigned NOT NULL, `id_carrier` int(10) unsigned NOT NULL, UNIQUE KEY `id_universalpay_system` (`id_universalpay_system`,`id_carrier`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); Db::getInstance()->Execute('CREATE TABLE `' . _DB_PREFIX_ . 'universalpay_system_group` ( `id_universalpay_system` int(10) unsigned NOT NULL, `id_group` int(10) unsigned NOT NULL, UNIQUE KEY `id_universalpay_system` (`id_universalpay_system`,`id_group`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); Db::getInstance()->Execute('ALTER TABLE `' . _DB_PREFIX_ . 'orders` ADD `up_fields` VARCHAR( 255 ) NOT NULL DEFAULT ""'); return parent::install() && $this->registerHook('displayPayment') && $this->registerHook('actionCarrierUpdate') && $this->registerHook('displayOrderDetail') && $this->registerHook('displayAdminOrderContentOrder') && $this->registerHook('displayAdminOrderTabOrder') && $this->registerHook('displayPaymentReturn') && mkdir(_PS_IMG_DIR_ . 'pay') && self::installModuleTab('AdminUniPaySystem', array('ru' => 'Платежные системы', 'default' => 'Pay Systems', 'it' => 'Metodi di pagamento'), 'AdminParentModules'); }
public function install() { //針對perstashop 的內定Hook 進行註冊 payment 跟 paymentReturn if (!parent::install() or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) { return false; } }
/** * PayPal USA installation process: * * Step 1 - Requirements checks (Shop country is USA, Canada or Mexico, cURL extension available) * Step 2 - Pre-set Configuration option values * Step 3 - Install the Addon and create a database table to store transaction details * * @return boolean Installation result */ public function install() { /* This Addon is only intended to work in the USA, Canada and Mexico */ if (Validate::isLoadedObject($this->_shop_country) && !in_array($this->_shop_country->iso_code, array('US', 'MX', 'CA'))) { $this->_errors[] = $this->l('Sorry, this module has been designed for stores based in USA, Canada and Mexico only. Please use the classic PayPal Addon instead.'); return false; } /* The cURL PHP extension must be enabled to use this module */ if (!function_exists('curl_version')) { $this->_errors[] = $this->l('Sorry, this module requires the cURL PHP Extension (http://www.php.net/curl), which is not enabled on your server. Please ask your hosting provider for assistance.'); return false; } /* General Configuration options */ Configuration::updateValue('PAYPAL_USA_SANDBOX', false); Configuration::updateValue('PAYPAL_USA_SANDBOX_ADVANCED', false); /* Configuration of PayPal Express Checkout */ Configuration::updateValue('PAYPAL_USA_EXP_CHK_PRODUCT', true); Configuration::updateValue('PAYPAL_USA_EXP_CHK_SHOPPING_CART', true); Configuration::updateValue('PAYPAL_USA_MANAGER_PARTNER', 'PayPal'); /* Configuration of the Payment options */ Configuration::updateValue('PAYPAL_USA_PAYMENT_STANDARD', true); Configuration::updateValue('PAYPAL_USA_PAYMENT_ADVANCED', false); Configuration::updateValue('PAYPAL_USA_EXPRESS_CHECKOUT', false); Configuration::updateValue('PAYPAL_USA_PAYFLOW_LINK', false); // 2013-11-8 if there is no country specified, choose US, otherwise module will fail if (version_compare(_PS_VERSION_, '1.5', '<')) { Configuration::updateValue('PS_SHOP_COUNTRY', 'US'); } else { Configuration::updateValue('PS_SHOP_COUNTRY_ID', 21); } return parent::install() && $this->registerHook('payment') && $this->registerHook('adminOrder') && $this->registerHook('header') && $this->registerHook('orderConfirmation') && $this->registerHook('shoppingCartExtra') && $this->registerHook('productFooter') && $this->registerHook('BackOfficeHeader') && $this->_installDb(); }
public function install() { if (!parent::install() or !$this->registerHook('payment') or !$this->registerHook('paymentReturn') or !Configuration::updateValue('GCHECKOUT_MERCHANT_ID', '822305931131113') or !Configuration::updateValue('GCHECKOUT_MERCHANT_KEY', '2Lv_osMomVIocnLK0aif3A') or !Configuration::updateValue('GCHECKOUT_LOGS', '1') or !Configuration::updateValue('GCHECKOUT_MODE', 'real') or !Configuration::updateValue('GCHECKOUT_NO_SHIPPING', '0')) { return false; } return true; }
public function install() { if (!parent::install() or !Configuration::updateValue('NETAXEPT_MID_TOKEN_CURR', '10000327;5e_R-Zp9;NOK') or !Configuration::updateValue('NETAXEPT_TERMINAL_URL', 'https://epayment-test.bbs.no/terminal/default.aspx') or !Configuration::updateValue('NETAXEPT_WSDL_URL', 'https://epayment-test.bbs.no/service.svc?wsdl') or !Configuration::updateValue('NETAXEPT_TQ_WSDL_URL', 'https://epayment-test.bbs.no/TokenQuery.svc?wsdl') or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) { return false; } return true; }
public function install() { if (!parent::install() || !$this->registerHook('payment') || !$this->registerHook('displayPaymentEU') || !$this->registerHook('paymentReturn')) { return false; } return true; }
public function install() { if (Shop::isFeatureActive()) { Shop::setContext(Shop::CONTEXT_ALL); } return parent::install() && $this->registerHook('invoice') && $this->registerHook('payment') && $this->registerHook('paymentReturn') && $this->createDebitNoteTable() && $this->createOrderState() && Configuration::updateValue('DEBITNOTE_CREDITOR_IDENTIFIER', DEXXXX); }