コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
ファイル: pagseguro.php プロジェクト: franklindias/prestashop
 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;
 }