当前位置: 首页>>代码示例>>PHP>>正文


PHP PaymentModule::install方法代码示例

本文整理汇总了PHP中PaymentModule::install方法的典型用法代码示例。如果您正苦于以下问题:PHP PaymentModule::install方法的具体用法?PHP PaymentModule::install怎么用?PHP PaymentModule::install使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PaymentModule的用法示例。


在下文中一共展示了PaymentModule::install方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: install

 /**
  * @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;
 }
开发者ID:securionpay,项目名称:securionpay-prestashop,代码行数:29,代码来源:SecurionPay.php

示例2: install

 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;
 }
开发者ID:rtajmahal,项目名称:PrestaShop-modules,代码行数:7,代码来源:alliedwallet.php

示例3: install

 public function install()
 {
     if (!parent::install() or !$this->registerHook('payment') or !$this->registerHook('paymentReturn')) {
         return false;
     }
     return true;
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:7,代码来源:cashondelivery.php

示例4: install

    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;
    }
开发者ID:hipay,项目名称:hipay-wallet-sdk-prestashop,代码行数:27,代码来源:hipay.php

示例5: install

    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;
    }
开发者ID:greench,项目名称:prestashop,代码行数:26,代码来源:hipay.php

示例6: install

 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 = 'support@supp.com';
     $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;
 }
开发者ID:handaehan,项目名称:yandex-money-cms-prestashop,代码行数:60,代码来源:yamodule.php

示例7: install

 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');
 }
开发者ID:Mezai,项目名称:swish,代码行数:7,代码来源:swish.php

示例8: install

 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;
 }
开发者ID:sengupta,项目名称:instamojo-prestashop,代码行数:7,代码来源:instamojo.php

示例9: install

 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;
     }
 }
开发者ID:Paytm-Payments,项目名称:Paytm_Prestashop_Kit,代码行数:25,代码来源:paytm.php

示例10: install

 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;
 }
开发者ID:paynl,项目名称:prestashop-plugin,代码行数:7,代码来源:paynl_paymentmethods.php

示例11: install

 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;
 }
开发者ID:shinichi2510,项目名称:prestashop-ipay88-plugin,代码行数:7,代码来源:ipay88.php

示例12: install

 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;
 }
开发者ID:iorweth7893,项目名称:Prestashop-eCard,代码行数:7,代码来源:ecard.php

示例13: install

 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*/
 }
开发者ID:juniorhq88,项目名称:PrestaShop-modules,代码行数:7,代码来源:paymentsense.php

示例14: install

 /**
  * 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;
 }
开发者ID:pedalracer,项目名称:free_modules_1.5,代码行数:31,代码来源:sofortueberweisung.php

示例15: install

 /**
  * 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;
 }
开发者ID:juniorhq88,项目名称:PrestaShop-modules,代码行数:12,代码来源:pagseguro.php


注:本文中的PaymentModule::install方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。