* @link http://www.oxidmodule.com */ class InstallRoutine extends d3install_updatebase { /** * @var string */ public $sModKey = 'd3heidelpay'; /** * @var string */ public $sModName = 'Unzer'; /** * @var string */ public $sModVersion = '6.3.0.0'; /** * @var string */ public $sMinModCfgVersion = '5.3.0.0'; /** @var string @deprecated since 2016-04-13 */ public $sModRevision = '6300'; /** * @var string */ public $sBaseConf = '-------------------------------------------------------------------------------- ZNBv2==Z3pRaXlQV2p4QldiYVdhRHozd2preDBrRjlrekNKL09oNG9VdmEzZyt0UVJQZ2NmSlBUaDk2K 0ZFUmowWFRPbWk0MTZwK01rU2g3OFc2VWdoV3BodVNDcFdUVTExdkQxYlIyZnprWFNFWk9CMWNXOGtUc 3pnYStmU0NaZ3FPTEFaTmdBOXJmajJLUnRnTjRrblcvYTlodWZ4SDh4ZFBtc1B6QzRCSWZmS0dYMnJna VozeXRHTEZiemtjaTNtbGJGeEt1Q3VReDAxbTZkK1VpV2d4M3Y3WXovbll1d3lJc0dNTUdHdDNQTXV6T kgySzFhYW5vQ0lpSzdabUxRRlFqRFJJRzJ6bk5CSlluZU5VcjRMOWFwYS9yL0ZuOE5DWFZRZkpGVEdQU kpkQWJPVVZzUlc1cHV3Tkh3eURZa0FzMEQ0ZFR4b3Z5U3hIRS9sWS9iWkVJenVnPT0= --------------------------------------------------------------------------------'; /** * @var string */ public $sRequirements = ''; /** * @var string */ public $sBaseValue = 'TyUzQTglM0ElMjJzdGRDbGFzcyUyMiUzQTI3JTNBJTdCcyUzQTM0JTNBJTIyZDNfY2ZnX21vZF9fZDNoZWlkZWxwYXlfYmxUZXN0bW9kZSUyMiUzQnMlM0ExJTNBJTIyMSUyMiUzQnMlM0EzOSUzQSUyMmQzX2NmZ19tb2RfX2QzaGVpZGVscGF5X3NTZWN1cml0eVNlbmRlciUyMiUzQnMlM0EwJTNBJTIyJTIyJTNCcyUzQTMxJTNBJTIyZDNfY2ZnX21vZF9fZDNoZWlkZWxwYXlfc1VzZXJJRCUyMiUzQnMlM0Ew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WxwYXlfb3h0cmFuc3N0YXR1c2Vycm9ybWFpbCUyMiUzQnMlM0EwJTNBJTIyJTIyJTNCcyUzQTQyJTNBJTIyZDNfY2ZnX21vZF9fZDNoZWlkZWxwYXlfb3h0cmFuc3N0YXR1c2Vycm9yJTIyJTNCcyUzQTUlM0ElMjJFUlJPUiUyMiUzQnMlM0EzOSUzQSUyMmQzX2NmZ19tb2RfX2QzaGVpZGVscGF5X2NhcmR0eXBldGltZW91dCUyMiUzQnMlM0EzJTNBJTIyNjAwJTIyJTNCcyUzQTM1JTNBJTIyZDNfY2ZnX21vZF9fc0QzSHBIRk9yZGVyUGVuZGluZ1RpbWUlMjIlM0JzJTNBMiUzQSUyMjI2JTIyJTNCcyUzQTI5JTNBJTIyZDNfY2ZnX21vZF9fc0QzSHBIRk9yZGVyTGltaXQlMjIlM0JzJTNBMyUzQSUyMjEwMCUyMiUzQnMlM0EzNCUzQSUyMmQzX2NmZ19tb2RfX3NEM0hwSEZPcmRlckNhbmNlbFR5cGUlMjIlM0JzJTNBMTMlM0ElMjJQTEVBU0VfQ0hPT1NFJTIyJTNCcyUzQTM4JTNBJTIyZDNfY2ZnX21vZF9fYmxEM0hwSEZTZXRaZXJvT3JkZXJOdW1iZXIlMjIlM0JzJTNBMSUzQSUyMjAlMjIlM0IlN0Q='; /** * @var array */ public $aFields = [ 'OXID_d3hpuid' => [ 'sTableName' => 'd3hpuid', 'sFieldName' => 'OXID', 'sType' => 'VARCHAR(32)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXUSERID_d3hpuid' => [ 'sTableName' => 'd3hpuid', 'sFieldName' => 'OXUSERID', 'sType' => 'VARCHAR(32)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXPAYMENTID_d3hpuid' => [ 'sTableName' => 'd3hpuid', 'sFieldName' => 'OXPAYMENTID', 'sType' => 'VARCHAR(32)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXUID_d3hpuid' => [ 'sTableName' => 'd3hpuid', 'sFieldName' => 'OXUID', 'sType' => 'VARCHAR(50)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXTIME_d3hpuid' => [ 'sTableName' => 'd3hpuid', 'sFieldName' => 'OXTIME', 'sType' => 'DATETIME', 'blNull' => false, 'sDefault' => '0000-00-00 00:00:00', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXPAYMENTDATA_d3hpuid' => [ 'sTableName' => 'd3hpuid', 'sFieldName' => 'OXPAYMENTDATA', 'sType' => 'TEXT', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXSHOPID_d3hpuid' => [ 'sTableName' => 'd3hpuid', 'sFieldName' => 'OXSHOPID', 'sType' => 'INT(11)', 'blNull' => false, 'sDefault' => '1', 'sComment' => '', 'sExtra' => '', 'blMultilang' => false, ], 'OXID_d3hperrortexts' => [ 'sTableName' => 'd3hperrortexts', 'sFieldName' => 'OXID', 'sType' => 'VARCHAR(32)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXCODE_d3hperrortexts' => [ 'sTableName' => 'd3hperrortexts', 'sFieldName' => 'OXCODE', 'sType' => 'VARCHAR(20)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXTYPE_d3hperrortexts' => [ 'sTableName' => 'd3hperrortexts', 'sFieldName' => 'OXTYPE', 'sType' => 'INT(1)', 'blNull' => false, 'sDefault' => '0', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXTITLE_d3hperrortexts' => [ 'sTableName' => 'd3hperrortexts', 'sFieldName' => 'OXTITLE', 'sType' => 'VARCHAR(255)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXTITLE_1_d3hperrortexts' => [ 'sTableName' => 'd3hperrortexts', 'sFieldName' => 'OXTITLE_1', 'sType' => 'VARCHAR(255)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'OXREALTEXT_d3hperrortexts' => [ 'sTableName' => 'd3hperrortexts', 'sFieldName' => 'OXREALTEXT', 'sType' => 'VARCHAR(255)', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay', 'sExtra' => '', 'blMultilang' => false, ], 'D3HEIDELPAYVOUCHERS_oxorder' => [ 'sTableName' => 'oxorder', 'sFieldName' => 'D3HEIDELPAYVOUCHERS', 'sType' => 'TEXT', 'blNull' => false, 'sDefault' => '', 'sComment' => 'D3 Heidelpay voucherinfos for temporary orders', 'sExtra' => '', 'blMultilang' => false, ], ]; // Standardwerte zum umbenennen Tables /** * @var array */ public $aIndizes = [ [ 'sTableName' => 'd3hpuid', 'sType' => d3database::INDEX_TYPE_PRIMARY, 'sName' => d3database::INDEX_TYPE_PRIMARY, 'aFields' => [ 'OXID' => 'OXID', ], 'blMultilang' => false, ], [ 'sTableName' => 'd3hpuid', 'sType' => 'KEY', 'sName' => 'OXSHOPID', 'aFields' => [ 'OXSHOPID' => 'OXSHOPID', ], 'blMultilang' => false, ], [ 'sTableName' => 'd3hpuid', 'sType' => 'KEY', 'sName' => 'OXUSERID', 'aFields' => [ 'OXUSERID' => 'OXUSERID', ], 'blMultilang' => false, ], [ 'sTableName' => 'd3hperrortexts', 'sType' => 'PRIMARY', 'sName' => 'PRIMARY', 'aFields' => [ 'OXID' => 'OXID', ], 'blMultilang' => false, ], ]; // Standardwerte fuer checkFields(), _addTable() und fixFields() // Standardwerte fuer checkIndizes() und fixIndizes() /** * @var array */ protected $_aRefreshMetaModuleIds = ['d3heidelpay']; /** * @var array */ protected $_aUpdateMethods = [ [ 'check' => 'hasToShowNoteForStoredData', 'do' => 'showNoteForStoredData' ], [ 'check' => 'checkModCfgItemExist', // Prueft auf Datenbankeintrag 'do' => 'updateModCfgItemExist' ], [ 'check' => 'checkD3hpuidTableExist', 'do' => 'updateD3hpuidTableExist' ], [ 'check' => 'checkD3hperrortextsTableExist', 'do' => 'updateD3hperrortextsTableExist' ], [ 'check' => 'hasEmptyCMSShopId', //0004566: Korrektur der Autoinstallation bei einem Modulupdate 'do' => 'removeEmptyCMSShopId' // bug fix for version 5.0.0.2 ], [ 'check' => 'checkHPerrortextcontent', // UPDATE `d3hperrortexts` SET `OXTYPE` = '2' WHERE `OXCODE` = '800.100.153'; 'do' => 'updateHPerrortextcontent' // Update 4.0.1.0 XE4 => 4.0.2.0 XE4 ], [ 'check' => 'hasOldTables', 'do' => 'deleteOldTables' ], [ 'check' => 'checkOxcontentEntrysExist', // Pruefte ob oxcontenteintraege schon vorhanden 'do' => 'showMessageForCustomerToUpdateManually' ], [ 'check' => 'checkOxcontentItemsExist', // sql befehle fuer Tabelle oxcontents 'do' => 'insertOxcontentItemsIfNotExist' ], [ 'check' => 'checkOxpaymentsItemsExist', // sql befehle fuer Tabelle oxpayments 'do' => 'insertOxpaymentsItemsIfNotExist' ], [ 'check' => 'checkD3hperrortextsItemsExist', // sql befehle fuer Tabelle d3hperrortexts 'do' => 'insertD3hperrortextsItemsIfNotExist' ], [ 'check' => 'checkForChangeHaendlerKontoMsg', 'do' => 'showForChangeHaendlerKontoMsg' ], [ 'check' => 'checkModCfgorderExecutePostFields', 'do' => 'updateModCfgorderExecutePostFields' ], [ 'check' => 'usingModCfgStoredDataWithoutRG', 'do' => 'updateModCfStoredDataWithRG' ], [ 'check' => 'hasModProfileEntries', 'do' => 'createModProfileEntries' ], [ 'check' => 'hasOldModuleItems', //nicht vorhandene Moduldatei-Eintraege entfernen 'do' => 'deleteOldModuleItems' ], [ 'check' => 'checkFields', 'do' => 'fixFields' ], [ 'check' => 'checkIndizes', 'do' => 'fixIndizes' ], [ 'check' => 'checkModCfgSameRevision', // Prueft auf nachgezogene Revisionsnummer 'do' => 'updateModCfgSameRevision' ], [ // this has to be the last step 'check' => 'hasMultilangConfigButNoSetting', 'do' => 'showMultilangConfigButNoSettingMessage' ], ]; /** * @return bool * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function hasToShowNoteForStoredData() { $hasAlreadyCorrectedData = $this->getConfig()->getSystemConfigParameter('d3HeidelpayNoteShownForStoredData'); if ($hasAlreadyCorrectedData) { return false; } if ($this->_checkTableNotExist('d3hpuid')) { return false; } if (DatabaseProvider::getDb()->getOne('SELECT COUNT(*) FROM d3hpuid')) { return true; } $this->getConfig()->saveSystemConfigParameter('bool', 'd3HeidelpayNoteShownForStoredData', true); return false; } /** * @return bool * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function showNoteForStoredData() { $this->_confirmMessage('D3HEIDELPAYNOTESHOWNFORSTOREDDATA'); $aDoList = []; $hasReferenceIndexCreated = $hasOxuidIndexCreated = false; //set indexes if (false == DatabaseProvider::getDb()->getOne('SHOW INDEX FROM d3transactionlog WHERE Column_name=\'D3REFERENCE\';')) { $referenceQuery = 'ALTER TABLE `d3transactionlog` ADD INDEX `D3REFERENCE` (`D3REFERENCE`);'; $aDoList[] = $referenceQuery; DatabaseProvider::getDb()->execute($referenceQuery); $hasReferenceIndexCreated = true; } if (false == DatabaseProvider::getDb()->getOne('SHOW INDEX FROM d3hpuid WHERE Column_name=\'OXUID\';')) { $d3huidQuery = 'ALTER TABLE `d3hpuid` ADD INDEX `OXUID` (`OXUID`);'; $aDoList[] = $d3huidQuery; DatabaseProvider::getDb()->execute($d3huidQuery); $hasOxuidIndexCreated = true; } //cleanup non linked entries $aDoList[] = 'DELETE FROM d3hpuid WHERE NOT EXISTS( SELECT NULL FROM d3transactionlog f WHERE f.D3REFERENCE = OXUID);'; //get all d3transaction entries from d3huid $db = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC); $result = $db->getAll( 'SELECT d3transactionlog.oxid AS oxid FROM d3hpuid LEFT JOIN d3transactionlog ON d3hpuid.`OXUID` = d3transactionlog.D3REFERENCE WHERE d3transactionlog.oxid IS NOT NULL;' ); $deleteIds = []; /** @var TransactionlogReader $reader */ $reader = oxNew(TransactionlogReader::class); foreach ($result as $logdata) { $transaction = oxNew(d3transactionlog::class, $reader); if (false == $transaction->load($logdata['oxid'])) { continue; } $reader = $transaction->getTransactiondata(); $paymentcode = strtolower($reader->getPaymentcode()); if (false == in_array($paymentcode, ['cc.rg', 'dc.rg'])) { $deleteIds[] = $transaction->getFieldData('d3reference'); continue; } } if (false == empty($deleteIds)) { $ids = join("','", $deleteIds); $aDoList[] = "DELETE FROM d3hpuid WHERE OXUID IN ('$ids');"; } if ($hasReferenceIndexCreated) { $referenceQuery = 'ALTER TABLE `d3transactionlog` DROP INDEX `D3REFERENCE`;'; $aDoList[] = $referenceQuery; DatabaseProvider::getDb()->execute($referenceQuery); } if ($hasOxuidIndexCreated) { $d3huidQuery = 'ALTER TABLE `d3hpuid` DROP INDEX `OXUID`;'; $aDoList[] = $d3huidQuery; DatabaseProvider::getDb()->execute($d3huidQuery); } $this->getConfig()->saveSystemConfigParameter('bool', 'd3HeidelpayNoteShownForStoredData', true); $this->setInitialExecMethod(__METHOD__); $blUseCombinedLogItem = false == $this->hasExecute(); return $this->_executeMultipleQueries($aDoList, $blUseCombinedLogItem); } /** * @return bool * @throws DatabaseConnectionException */ public function checkD3hperrortextsItemsExist() { return $this->_checkUpdateFile('d3/heidelpay/Setup/d3hp_errortextsQuerys.php'); } /** * @return bool * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function insertD3hperrortextsItemsIfNotExist() { return $this->_doUpdateFile('d3/heidelpay/Setup/d3hp_errortextsQuerys.php'); } /**************************************************** * Tabellen anlegen * ****************************************************/ /** * @return bool TRUE, if table exsist * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function hasOldTables() { return $this->_checkTableExist('PrepaymentData') || $this->_checkTableExist('oxhpprepaymentdata') || $this->_checkTableExist('oxpaylogs') || $this->_checkTableExist('oxhpuid') || $this->_checkTableExist('oxhperrortexts') || $this->_checkTableExist('oxobject2heidelpay'); } /** * @return bool * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function deleteOldTables() { $blRet = true; if ($this->_checkTableExist('PrepaymentData')) { $aRet = $this->_dropTable('PrepaymentData'); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); } if ($this->_checkTableExist('oxhpprepaymentdata')) { $aRet = $this->_dropTable('oxhpprepaymentdata'); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); } if ($this->_checkTableExist('oxobject2heidelpay')) { $aRet = $this->_dropTable('oxobject2heidelpay'); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); } if ($this->_checkTableExist('oxhpuid')) { $aRet = $this->_dropTable('oxhpuid'); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); } if ($this->_checkTableExist('oxhperrortexts')) { $aRet = $this->_dropTable('oxhperrortexts'); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); } if ($this->_checkTableExist('oxpaylogs')) { $aRet = $this->_dropTable('oxpaylogs'); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); } return $blRet; } /** * @return bool * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function updateD3hpuidTableExist() { $blRet = true; if ($this->checkD3hpuidTableExist()) { $aRet = $this->_addTable2('d3hpuid', $this->aFields, $this->aIndizes, 'D3 Heidelpay', 'MyISAM'); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); } return $blRet; } /** * @return bool TRUE, if table is missing * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function checkD3hpuidTableExist() { return $this->_checkTableNotExist('d3hpuid'); } /** * @return bool * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function updateD3hperrortextsTableExist() { $blRet = true; if ($this->checkD3hperrortextsTableExist()) { $aRet = $this->_addTable2('d3hperrortexts', $this->aFields, $this->aIndizes, 'D3 Heidelpay', 'MyISAM'); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); } return $blRet; } /** * @return bool TRUE, if table is missing * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function checkD3hperrortextsTableExist() { return $this->_checkTableNotExist('d3hperrortexts'); } /**************************************************** * Tabelle oxcontents & oxpayments * * if entrys not exist -> insert * ****************************************************/ /** * @return bool * @throws ConnectionException * @throws DatabaseConnectionException * @throws SystemComponentException */ public function checkOxcontentItemsExist() { return $this->_hasExecuteFileQuery('d3/heidelpay/Setup/d3hp_oxcontentsQuerys.php'); } /** * @param $sFileName * * @return bool * @throws ConnectionException * @throws DatabaseConnectionException * @throws SystemComponentException */ protected function _hasExecuteFileQuery($sFileName) { startProfile(__METHOD__); $result = false; $sCurrentShopId = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); $aList = $this->_parseUpdateFile($sFileName); foreach ($aList['check'] as $sCheckQuery) { if (DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getOne($sCheckQuery)) { $result = true; break; } } } $this->_changeToShop($sCurrentShopId); stopProfile(__METHOD__); return $result; } /** * @return bool * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function insertOxcontentItemsIfNotExist() { Registry::getSession()->setVariable('d3hp_update_skip_oxcontents', 1); return $this->_executeFileQueries('d3/heidelpay/Setup/d3hp_oxcontentsQuerys.php'); } /** * @param $sFileName * * @return bool * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ protected function _executeFileQueries($sFileName) { startProfile(__METHOD__); $blRet = true; $aDoList = []; $sCurrentShopId = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); $aList = $this->_parseUpdateFile($sFileName); $oD3Str = oxNew(d3str::class); $oD3Str->convert2utf_8($aList, false); foreach ($aList['check'] as $sKey => $sCheckQuery) { if (DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getOne($sCheckQuery)) { $aList['do'][$sKey] = utf8_encode($aList['do'][$sKey]); $aDoList[] = $aList['do'][$sKey]; } } } $this->_changeToShop($sCurrentShopId); if ($aDoList && is_array($aDoList) && count($aDoList)) { $this->setInitialExecMethod(__METHOD__); $blUseCombinedLogItem = !$this->hasExecute(); $blRet = $this->_executeMultipleQueries($aDoList, $blUseCombinedLogItem); } stopProfile(__METHOD__); return $blRet; } /**************************************************** * Tabelle oxcontents * * No Autoupdate if exist -> Message * ****************************************************/ /** * @return bool * @throws DatabaseConnectionException */ public function checkOxpaymentsItemsExist() { return $this->_checkUpdateFile('d3/heidelpay/Setup/d3hp_oxpaymentsQuerys.php'); } /** * @return bool * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function insertOxpaymentsItemsIfNotExist() { return $this->_doUpdateFile('d3/heidelpay/Setup/d3hp_oxpaymentsQuerys.php'); } /** * @return bool * @throws ConnectionException * @throws DBALException * @throws DatabaseConnectionException */ public function checkOxcontentEntrysExist() { $blRet = false; $bSkipUpdate = Registry::getSession()->getVariable('d3hp_update_skip_oxcontents'); if ($bSkipUpdate) { return $blRet; } foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $query = /** @lang MySQL */ <<checkModCfgSameRevision(); if ((DatabaseProvider::getDb()->getOne($query)) && $blInstallationIsNotComplete) { $blRet = true; } } return $blRet; } /** * Message for manuelle Updates for CMS-Sites * * @return bool */ public function showMessageForCustomerToUpdateManually() { $sMessage = 'D3_HEIDELPAY_UPDATE_OXCONTENTITEMS'; $blRet = $this->_confirmMessage($sMessage); Registry::getSession()->setVariable('d3hp_update_skip_oxcontents', 1); return $blRet; } /** * @return bool * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function updateHPerrortextcontent() { $blRet = false; if ($this->checkHPerrortextcontent()) { $aWhere = [ 'oxcode' => '800.100.153', ]; if ($this->_checkTableItemNotExist('d3hperrortexts', $aWhere)) { $aInsertFields = [ 'OXID' => [ 'content' => "366", 'force_update' => true, 'use_quote' => false, ], 'OXCODE' => [ 'content' => '800.100.153', 'force_update' => true, 'use_quote' => true, ], 'OXTYPE' => [ 'content' => "2", 'force_update' => true, 'use_quote' => true, ], 'OXTITLE' => [ 'content' => "Ungültige Prüfziffer", 'force_update' => true, 'use_quote' => true, ], 'OXTITLE_1' => [ 'content' => "transaction declined (invalid CVV)", 'force_update' => false, 'use_quote' => false, ], 'OXREALTEXT' => [ 'content' => "transaction declined (invalid CVV)", 'force_update' => true, 'use_quote' => true, ] ]; $aRet = $this->_updateTableItem2('d3hperrortexts', $aInsertFields, $aWhere); $blRet = $aRet['blRet']; $this->setActionLog('SQL', $aRet['sql'], __METHOD__); $this->setUpdateBreak(false); } } // if actually updated don't update entry a second time Registry::getSession()->setVariable('d3hp_HPerrortext_skip_update', 1); return $blRet; } /** * @return bool * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function checkHPerrortextcontent() { $blRet = false; $bSkipUpdate = Registry::getSession()->getVariable('d3hp_HPerrortext_skip_update'); $bSkipUpdateCauseTableNotExist = !$this->checkD3hperrortextsTableExist(); if ($bSkipUpdate || $bSkipUpdateCauseTableNotExist) { return $blRet; } $aWhere = [ 'oxcode' => '800.100.153', ]; $blRet1 = $this->_checkTableItemNotExist('d3hperrortexts', $aWhere); $blRetX = $this->checkModCfgSameRevision(); if ($blRet1 && $blRetX) { $blRet = true; } return $blRet; } /** * @return bool * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function checkRenameD3Tables() { return $this->checkRenameTables(); } /** * @return bool * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function renameD3Tables() { /** @param string $sMethodName */ return $this->fixRenameTables(__METHOD__); } /** * @return bool * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function showForChangeHaendlerKontoMsg() { $oConfirmMessage = oxNew(d3installconfirmmessage::class, $this); if (false == $this->hasExecute()) { $oConfirmMessage->showConfigConfirmMessage('blD3checkForModHaendlerKontoMsg', 'D3_HEIDELPAY_UPDATE_CHANGE_HAENDLERKONTO'); } if ($this->hasExecute() && $this->checkForChangeHaendlerKontoMsg()) { $sCurrentShopid = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); $oConfirmMessage->setConfirmMessageConfigRequest('blD3checkForModHaendlerKontoMsg', 1); } $this->_changeToShop($sCurrentShopid); } return true; } /** * @return bool * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function checkForChangeHaendlerKontoMsg() { $sCurrentShopid = $this->getConfig()->getShopId(); $result = false; foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); $moduleConfiguration = d3_cfg_mod::getNoCache($this->sModKey); if (false === $moduleConfiguration) { continue; } $oldVersionNumber = (int)$moduleConfiguration->getFieldData('oxversionnum'); //check if old module version is new installation or older than 4.0.5.0 if ($oldVersionNumber <= 0 || $oldVersionNumber >= 67110144) { continue; } $oConfirmMessage = oxNew(d3installconfirmmessage::class, $this); if (false == $oConfirmMessage->hasConfirmMessageConfigRequest('blD3checkForModHaendlerKontoMsg')) { $result = true; break; } } $this->_changeToShop($sCurrentShopid); return $result; } /** * @return bool * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function checkModCfgorderExecutePostFields() { $blReturn = false; $sCurrentShopid = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); $moduleConfiguration = d3_cfg_mod::getNoCache($this->sModKey); if (false === $moduleConfiguration) { continue; } if (false == is_string( $moduleConfiguration->getValue('d3heidelpay_orderExecutePostFields') ) || strlen( $moduleConfiguration->getValue('d3heidelpay_orderExecutePostFields') ) == 0 ) { $blReturn = true; } } $this->_changeToShop($sCurrentShopid); return $blReturn; } /** * @return bool * @throws d3ShopCompatibilityAdapterException * @throws d3_cfg_mod_exception * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws StandardException */ public function updateModCfgorderExecutePostFields() { $aDefaultConfig = unserialize(rawurldecode(base64_decode($this->sBaseValue))); $sCurrentShopid = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); /** @var $oShop BaseModel */ /** @var d3_cfg_mod $moduleConfiguration */ $moduleConfiguration = d3_cfg_mod::getNoCache($this->sModKey); if (false === $moduleConfiguration) { continue; } $moduleConfiguration->setValue( 'd3heidelpay_orderExecutePostFields', $aDefaultConfig->d3_cfg_mod__d3heidelpay_orderExecutePostFields ); if ($this->hasExecute()) { $moduleConfiguration->save(); } $sQuery = 'UPDATE ' . $moduleConfiguration->getCoreTableName() // . ' SET oxvalue = ' // . DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->quote($moduleConfiguration->getFieldData('oxvalue')) // . " WHERE oxmodid = " . DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->quote($this->sModKey) // . " AND oxshopid = " . DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->quote($oShop->getId()) . ";"; $this->setActionLog( 'SQL', $sQuery, $this->getInitialExecMethod(__METHOD__) ); } $this->_changeToShop($sCurrentShopid); return true; } /** * @return bool * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function usingModCfgStoredDataWithoutRG() { startProfile(__METHOD__); $return = false; $currentShopId = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); $modConfig = d3_cfg_mod::getNoCache($this->sModKey); if (false === $modConfig) { continue; } $config = $oShop->getConfig(); if ($config->getShopConfVar('d3HeidelpayNoteStoredDataWithoutRG')) { continue; } if ($modConfig->getValue('d3heidelpay_blShowStoredHPData') && false == $modConfig->getValue('d3heidelpay_blCardsUseRG')) { $return = true; } } $this->_changeToShop($currentShopId); stopProfile(__METHOD__); return $return; } /** * @return bool * @throws d3ShopCompatibilityAdapterException * @throws d3_cfg_mod_exception * @throws DBALException * @throws ConnectionException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws StandardException */ public function updateModCfStoredDataWithRG() { startProfile(__METHOD__); $return = false; $currentShopId = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); $modConfig = d3_cfg_mod::getNoCache($this->sModKey); if (false === $modConfig) { continue; } $config = $oShop->getConfig(); if ($config->getShopConfVar('d3HeidelpayNoteStoredDataWithoutRG')) { continue; } if ($modConfig->getValue('d3heidelpay_blShowStoredHPData') && false == $modConfig->getValue('d3heidelpay_blCardsUseRG')) { $oConfirmMessage = oxNew(d3installconfirmmessage::class, $this); $message = Registry::getLang()->translateString('D3HEIDELPAYNOTESTOREDDATAWITHOUTRG'); $message .= Registry::getLang()->translateString('HELP_D3DYN_HEIDELPAY_PARAM_CARDS_USE_RG'); $oConfirmMessage->confirmCustomMessage($message); if ($this->hasExecute()) { $modConfig->setValue('d3heidelpay_blCardsUseRG', true); $modConfig->save(); $config->saveShopConfVar('bool', 'd3HeidelpayNoteStoredDataWithoutRG', true); } } } $this->_changeToShop($currentShopId); stopProfile(__METHOD__); return $return; } /** * 0004566: Korrektur der Autoinstallation bei einem Modulupdate * * @return bool * @throws DatabaseConnectionException */ public function hasEmptyCMSShopId() { $oDb = DatabaseProvider::getDb(); $sHasEmptyCMSShopIdQuery = <<quote('d3%')} AND `OXSHOPID` IN ('0', '') MYSQL; return (bool)$oDb->getOne($sHasEmptyCMSShopIdQuery); } /** * 0004566: Korrektur der Autoinstallation bei einem Modulupdate * * @return bool * @throws DatabaseConnectionException * @throws DatabaseErrorException */ public function removeEmptyCMSShopId() { // ggf deleteTableitem benutzen? $oDb = DatabaseProvider::getDb(); $sHasEmptyCMSShopIdQuery = <<quote('d3%')} AND `OXSHOPID` IN ('0', '') MYSQL; $return = $this->sqlExecute($sHasEmptyCMSShopIdQuery); $this->setActionLog('SQL', $sHasEmptyCMSShopIdQuery, __METHOD__); return $return; } /** * @return bool * @throws ConnectionException * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function hasMultilangConfigButNoSetting() { startProfile(__METHOD__); $return = false; $currentShopId = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ if ($currentShopId != $oShop->getId()) { continue; } $config = $oShop->getConfig(); if ($config->getShopConfVar('d3hp_allowMultipleLanguages', null, 'd3heidelpay')) { continue; } if ($this->getSession()->getVariable('d3heidelpay_skip_multilangcheck' . $currentShopId)) { return false; } $actuallCalledMethod = $this->getConfig()->getActiveView()->getFncName(); if ('autoinstall' === strtolower($actuallCalledMethod)) { $this->getSession()->setVariable('d3heidelpay_skip_multilangcheck' . $currentShopId, true); return false; } $modConfig = d3_cfg_mod::getNoCache($this->sModKey); if (false === $modConfig) { continue; } $moduleConfig = oxNew(d3_cfg_mod::class); $moduleConfig->setEnableMultilang(false); $moduleConfig->init(); $moduleConfig->load($modConfig->getId()); $languageCount = count((array)$config->getShopConfVar('aLanguages')); for ($i = 1; $languageCount > $i; $i++) { $oxvalue = $moduleConfig->getFieldData('oxvalue_' . $i); if (empty($oxvalue)) { continue; } $return = true; break 2; } } stopProfile(__METHOD__); return $return; } /** * @return bool * @throws ConnectionException * @throws SystemComponentException */ public function showMultilangConfigButNoSettingMessage() { startProfile(__METHOD__); $currentShopId = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ if ($currentShopId != $oShop->getId()) { continue; } $actuallCalledMethod = $this->getConfig()->getActiveView()->getFncName(); if ('autoinstall' === strtolower($actuallCalledMethod)) { return true; } /** @var $oShop BaseModel */ $this->_confirmMessage('D3HEIDELPAY_MULTIPLE_LANGUAGECONFIGURATIONS_FOUND'); if ($this->hasExecute()) { $this->getSession()->setVariable('d3heidelpay_skip_multilangcheck' . $currentShopId, true); } return true; } stopProfile(__METHOD__); return false; } /** * @return bool * @throws ConnectionException * @throws DBALException * @throws DatabaseConnectionException * @throws DatabaseErrorException * @throws SystemComponentException */ public function hasModProfileEntries() { $blReturn = false; $sCurrentShopid = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); /** @var ModProfile $modProfile */ $modProfile = oxNew(ModProfile::class); /** @var Factory $factory */ $factory = oxNew(Factory::class)->setModuleConfiguration(d3_cfg_mod::getNoCache('d3heidelpay')); $oxid = $factory->getModProfileId(); if ($modProfile->exists($oxid)) { continue; } $blReturn = true; break; } $this->_changeToShop($sCurrentShopid); return $blReturn; } /** * @return bool * @throws ConnectionException * @throws Exception */ public function createModProfileEntries() { $blReturn = false; $sCurrentShopid = $this->getConfig()->getShopId(); foreach ($this->getShopListByActiveModule($this->sModKey) as $oShop) { /** @var $oShop BaseModel */ $this->_changeToShop($oShop->getId()); /** @var ModProfile $modProfile */ $modProfile = oxNew(ModProfile::class); /** @var Factory $factory */ $d3CfgMod = d3_cfg_mod::getNoCache('d3heidelpay'); $factory = oxNew(Factory::class)->setModuleConfiguration($d3CfgMod); $oxid = $factory->getModProfileId(); if ($modProfile->exists($oxid)) { continue; } $oldPaymentlist = $d3CfgMod->getValue('d3heidelpay_aPaymentList'); $oxValue = ''; if (empty($oldPaymentlist)) { $oxValue = 'TyUzQTglM0ElMjJzdGRDbGFzcyUyMiUzQTEwJTNBJTdCcyUzQTMyJTNBJTIyYzY5MzViN2Q3MDUxY2NmNzY5MTcwYTY4MWU3ZDg3ODIlMjIlM0JzJTNBNDgzJTNBJTIyJTdCJTIyY2FyZFR5cGVUaW1lb3V0JTIyJTNBMCUyQyUyMmhlaWRlbHBheVBheW1lbnRDbGFzc25hbWUlMjIlM0ElMjJEMyU1QyU1Q0hlaWRlbHBheSU1QyU1Q01vZGVscyU1QyU1Q1BheW1lbnQlNUMlNUNDcmVkaXRjYXJkJTIyJTJDJTIyaXNVc2luZ1JlZ2lzdHJhdGlvbiUyMiUzQW51bGwlMkMlMjJpc1VzaW5nU3RvcmVkQ2FyZERhdGElMjIlM0FudWxsJTJDJTIyaWQlMjIlM0ElMjJjNjkzNWI3ZDcwNTFjY2Y3NjkxNzBhNjgxZTdkODc4MiUyMiUyQyUyMmlzQWN0aXZlJTIyJTNBJTIyMSUyMiUyQyUyMnRpdGxlJTIyJTNBJTIyS3JlZGl0a2FydGUlMjIlMkMlMjJwYXltZW50VHlwZSUyMiUzQSUyMkQzJTVDJTVDSGVpZGVscGF5JTVDJTVDTW9kZWxzJTVDJTVDU2V0dGluZ3MlNUMlNUNDaGFubmVscyU1QyU1Q0NyZWRpdENhcmQlMjIlMkMlMjJjaGFubmVsJTIyJTNBJTIyMzFIQTA3QkM4MTQyQzVBMTcxNzQ5QTYw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MlNUMlNUNTZXR0aW5ncyU1QyU1Q0NoYW5uZWxzJTVDJTVDSWRlYWwlMjIlMkMlMjJjaGFubmVsJTIyJTNBJTIyMzFIQTA3QkM4MTQyQzVBMTcxNzQ0QjU2RTYxMjgxRTUlMjIlMkMlMjJ0cmFuc2FjdGlvblR5cGUlMjIlM0ElMjIlMjIlMkMlMjJpc1Rlc3RDb25maWclMjIlM0ElMjIxJTIyJTJDJTIyb3hpZHBheW1lbnRJZHMlMjIlM0ElNUIlNUQlMkMlMjJza2lwUHJvcGVydGllcyUyMiUzQSU1QiUyMm94aWRwYXltZW50SWRzJTIyJTJDJTIyc2tpcFByb3BlcnRpZXMlMjIlMkMlMjJoZWlkZWxwYXlQYXltZW50Q2xhc3NuYW1lJTIyJTVEJTJDJTIyb3hpZCUyMiUzQSUyMmE0N2E2ODAxOGFhYjYxOWU5OTVlNjc2NDk2YzRkZDJlJTIyJTdEJTIyJTNCJTdE'; } $modProfile->setId($oxid); $modProfile->assign([ 'oxactive' => '1', 'oxtitle' => 'json configuration', 'oxmodid' => $this->sModKey, 'oxvalue' => $oxValue, ]); if ($modProfile->save()) { $blReturn = true; } } $this->_changeToShop($sCurrentShopid); return $blReturn; } }