From c41483393fe583760ac6271167c3e076be184cd7 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 13:22:19 +0300 Subject: [PATCH 01/19] [SV-33] init --- src/Entity/SaferPayLog.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Entity/SaferPayLog.php b/src/Entity/SaferPayLog.php index c5842965..2ee828a6 100755 --- a/src/Entity/SaferPayLog.php +++ b/src/Entity/SaferPayLog.php @@ -27,18 +27,32 @@ class SaferPayLog extends ObjectModel { - public $message; + public $id_saferpay_log; - public $date_add; + public $id_log; + + public $id_shop; + + public $correlation_id; + + public $message; public $payload; + public $context; + + public $date_add; + public static $definition = [ 'table' => 'saferpay_log', 'primary' => 'id_saferpay_log', 'fields' => [ + 'id_log' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], + 'id_shop' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], + 'correlation_id' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'message' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'payload' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], + 'context' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'date_add' => ['type' => self::TYPE_DATE, 'validate' => 'isDate'], ], ]; From df3e22a9b5fd89dc2377fc3ad0b88b9d2764f618 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 13:25:22 +0300 Subject: [PATCH 02/19] [SV-33] fix --- src/Entity/SaferPayLog.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Entity/SaferPayLog.php b/src/Entity/SaferPayLog.php index 2ee828a6..f9774c27 100755 --- a/src/Entity/SaferPayLog.php +++ b/src/Entity/SaferPayLog.php @@ -33,8 +33,6 @@ class SaferPayLog extends ObjectModel public $id_shop; - public $correlation_id; - public $message; public $payload; @@ -49,7 +47,6 @@ class SaferPayLog extends ObjectModel 'fields' => [ 'id_log' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], 'id_shop' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], - 'correlation_id' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'message' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'payload' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'context' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], From 80ba7403806554848f612670b41b8847dbe10500 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 13:33:16 +0300 Subject: [PATCH 03/19] [SV-33] edit sql --- src/Entity/SaferPayLog.php | 3 ++- src/Install/Installer.php | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Entity/SaferPayLog.php b/src/Entity/SaferPayLog.php index f9774c27..10069edd 100755 --- a/src/Entity/SaferPayLog.php +++ b/src/Entity/SaferPayLog.php @@ -48,7 +48,8 @@ class SaferPayLog extends ObjectModel 'id_log' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], 'id_shop' => ['type' => self::TYPE_INT, 'validate' => 'isInt'], 'message' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], - 'payload' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], + 'request' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], + 'response' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'context' => ['type' => self::TYPE_STRING, 'validate' => 'isString'], 'date_add' => ['type' => self::TYPE_DATE, 'validate' => 'isDate'], ], diff --git a/src/Install/Installer.php b/src/Install/Installer.php index d005c53b..2c1b1382 100755 --- a/src/Install/Installer.php +++ b/src/Install/Installer.php @@ -299,10 +299,14 @@ private function installSaferPayCardAlias() private function installSaferPayLog() { return Db::getInstance()->execute( - 'CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . 'saferpay_log' . '( + 'CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . pSQL(\SaferPayLog::$definition['table']) . '( `id_saferpay_log` INTEGER(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, + `id_log` INTEGER(10) DEFAULT 0, + `id_shop` INTEGER(10) DEFAULT 0, `message` TEXT NOT NULL, - `payload` TEXT NOT NULL, + `request` TEXT NOT NULL, + `response` TEXT NOT NULL, + `context` TEXT NOT NULL, `date_add` datetime NOT NULL ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci' ); From 8d802e97ce611d38348ccc3dce09b7142968d534 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 13:37:27 +0300 Subject: [PATCH 04/19] [SV-33] add upgrade file --- upgrade/install-1.2.4.php | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 upgrade/install-1.2.4.php diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php new file mode 100644 index 00000000..07ac45fe --- /dev/null +++ b/upgrade/install-1.2.4.php @@ -0,0 +1,42 @@ + + *@copyright SIX Payment Services + *@license SIX Payment Services + */ + +use Invertus\SaferPay\Config\SaferPayConfig; +use Invertus\SaferPay\DTO\Request\RequestHeader; + +if (!defined('_PS_VERSION_')) { + exit; +} + +function upgrade_module_1_2_3(SaferPayOfficial $module) +{ + $installer = new \Invertus\SaferPay\Install\Installer($module); + + return + $installer->createPendingOrderStatus() && + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'saferpay_order ADD COLUMN `pending` TINYINT(1) DEFAULT 0') && + $module->registerHook('displayOrderConfirmation') && + $module->unregisterHook('actionOrderHistoryAddAfter') && + Configuration::updateValue(RequestHeader::SPEC_VERSION, SaferPayConfig::API_VERSION) && + Configuration::updateValue(RequestHeader::SPEC_REFUND_VERSION, SaferPayConfig::API_VERSION); +} From 366b99c637aa8332ee5ff338cd27889eb1d785cf Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 13:41:12 +0300 Subject: [PATCH 05/19] [SV-33] on upgrade update sql --- upgrade/install-1.2.4.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php index 07ac45fe..aaa03aa6 100644 --- a/upgrade/install-1.2.4.php +++ b/upgrade/install-1.2.4.php @@ -32,11 +32,12 @@ function upgrade_module_1_2_3(SaferPayOfficial $module) { $installer = new \Invertus\SaferPay\Install\Installer($module); - return - $installer->createPendingOrderStatus() && - Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'saferpay_order ADD COLUMN `pending` TINYINT(1) DEFAULT 0') && - $module->registerHook('displayOrderConfirmation') && - $module->unregisterHook('actionOrderHistoryAddAfter') && - Configuration::updateValue(RequestHeader::SPEC_VERSION, SaferPayConfig::API_VERSION) && - Configuration::updateValue(RequestHeader::SPEC_REFUND_VERSION, SaferPayConfig::API_VERSION); + return Db::getInstance()->execute( + 'ALTER TABLE ' . _DB_PREFIX_ . SaferPayLog::$definition['table'] . ' + ADD COLUMN `id_log` INTEGER(10) DEFAULT 0, + ADD COLUMN `id_shop` INTEGER(10) DEFAULT 0, + CHANGE `payload` `request` TEXT, + ADD COLUMN `response` TEXT, + ADD COLUMN `context` TEXT;' + ); } From ea35f11d16064d939ff30d8161b790a43218deae Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 13:43:48 +0300 Subject: [PATCH 06/19] [SV-33] add --- upgrade/install-1.2.4.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php index aaa03aa6..997f11bf 100644 --- a/upgrade/install-1.2.4.php +++ b/upgrade/install-1.2.4.php @@ -28,10 +28,8 @@ exit; } -function upgrade_module_1_2_3(SaferPayOfficial $module) +function upgrade_module_1_2_4(SaferPayOfficial $module) { - $installer = new \Invertus\SaferPay\Install\Installer($module); - return Db::getInstance()->execute( 'ALTER TABLE ' . _DB_PREFIX_ . SaferPayLog::$definition['table'] . ' ADD COLUMN `id_log` INTEGER(10) DEFAULT 0, From 79bb14b773056095369908c0e69928e11ff6a32f Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 13:47:29 +0300 Subject: [PATCH 07/19] [SV-33] added repo to composer --- composer.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index cd10dd9a..fc0e2d57 100755 --- a/composer.json +++ b/composer.json @@ -21,13 +21,17 @@ "php": "5.6" } }, - "repositories": [ - { + "repositories": { + "knapsack": { + "type": "vcs", + "url": "https://github.com/Invertus/Knapsack.git" + }, + "0": { "type": "vcs", "url": "https://github.com/Invertus/lock.git", "no-api": true } - ], + }, "require": { "vlucas/phpdotenv": "^3.6", "symfony/expression-language": "^3.4", From 2cc8983d4195b5145901998e25217459dd6efce3 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 13:53:18 +0300 Subject: [PATCH 08/19] [SV-33] add --- composer.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index fc0e2d57..8f43ad93 100755 --- a/composer.json +++ b/composer.json @@ -41,14 +41,16 @@ "apimatic/unirest-php": "^2.3", "symfony/yaml": "^3.4", "league/container": "2.5.0", - "invertus/lock": "^1.0.0" + "invertus/lock": "^1.0.0", + "invertus/knapsack": "^10.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "*", "phpunit/phpunit": "*", "behat/behat": "*", "symfony/translation": "*", - "prestashop/php-dev-tools": "^3.16" + "prestashop/php-dev-tools": "^3.16", + "invertus/knapsack": "^10.0" }, "scripts": { "test-integration": "./vendor/bin/phpunit --configuration ./tests/Integration/phpunit.xml", From be9cc6b5317318a7b5cd3a2b4bc62d2bbee90bad Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 15:35:51 +0300 Subject: [PATCH 09/19] [SV-33] increase version --- saferpayofficial.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/saferpayofficial.php b/saferpayofficial.php index a4a4e230..4437fc62 100755 --- a/saferpayofficial.php +++ b/saferpayofficial.php @@ -40,7 +40,7 @@ public function __construct($name = null) { $this->name = 'saferpayofficial'; $this->author = 'Invertus'; - $this->version = '1.2.3'; + $this->version = '1.2.4'; $this->module_key = '3d3506c3e184a1fe63b936b82bda1bdf'; $this->displayName = 'SaferpayOfficial'; $this->description = 'Saferpay Payment module'; From e77a116aff8f03cd19466668433c0b7346cc8bb8 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Mon, 30 Sep 2024 17:22:17 +0300 Subject: [PATCH 10/19] [SV-33] update schema --- src/Install/Installer.php | 18 +++++++++--------- upgrade/install-1.2.4.php | 7 ++++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Install/Installer.php b/src/Install/Installer.php index 2c1b1382..a35017d5 100755 --- a/src/Install/Installer.php +++ b/src/Install/Installer.php @@ -300,15 +300,15 @@ private function installSaferPayLog() { return Db::getInstance()->execute( 'CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . pSQL(\SaferPayLog::$definition['table']) . '( - `id_saferpay_log` INTEGER(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, - `id_log` INTEGER(10) DEFAULT 0, - `id_shop` INTEGER(10) DEFAULT 0, - `message` TEXT NOT NULL, - `request` TEXT NOT NULL, - `response` TEXT NOT NULL, - `context` TEXT NOT NULL, - `date_add` datetime NOT NULL - ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci' + `id_saferpay_log` INTEGER(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, + `id_log` INTEGER(10) DEFAULT 0, + `id_shop` INTEGER(10) DEFAULT 1, + `message` TEXT NOT NULL DEFAULT "", + `request` TEXT NOT NULL DEFAULT "", + `response` TEXT NOT NULL DEFAULT "", + `context` TEXT NOT NULL DEFAULT "", + `date_add` datetime NOT NULL DEFAULT NOW() + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci' ); } diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php index 997f11bf..ac08bd24 100644 --- a/upgrade/install-1.2.4.php +++ b/upgrade/install-1.2.4.php @@ -33,9 +33,10 @@ function upgrade_module_1_2_4(SaferPayOfficial $module) return Db::getInstance()->execute( 'ALTER TABLE ' . _DB_PREFIX_ . SaferPayLog::$definition['table'] . ' ADD COLUMN `id_log` INTEGER(10) DEFAULT 0, - ADD COLUMN `id_shop` INTEGER(10) DEFAULT 0, + ADD COLUMN `id_shop` INTEGER(10) DEFAULT 1, CHANGE `payload` `request` TEXT, - ADD COLUMN `response` TEXT, - ADD COLUMN `context` TEXT;' + ADD COLUMN `response` TEXT DEFAULT "", + ADD COLUMN `context` TEXT DEFAULT "", + ADD PRIMARY KEY (`id_log`, `id_shop`);' ); } From 58276b53a2b07aa8f80c2378a9f924714a606e53 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Tue, 1 Oct 2024 15:20:35 +0300 Subject: [PATCH 11/19] [SV-33] fixed issues --- src/Install/Installer.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Install/Installer.php b/src/Install/Installer.php index a35017d5..69136f0e 100755 --- a/src/Install/Installer.php +++ b/src/Install/Installer.php @@ -300,15 +300,17 @@ private function installSaferPayLog() { return Db::getInstance()->execute( 'CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . pSQL(\SaferPayLog::$definition['table']) . '( - `id_saferpay_log` INTEGER(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, - `id_log` INTEGER(10) DEFAULT 0, - `id_shop` INTEGER(10) DEFAULT 1, + `id_saferpay_log` INTEGER(10) UNSIGNED AUTO_INCREMENT, + `id_log` INT(10) DEFAULT 0, + `id_shop` INT(10) DEFAULT ' . Configuration::get('PS_SHOP_DEFAULT') . ', `message` TEXT NOT NULL DEFAULT "", `request` TEXT NOT NULL DEFAULT "", `response` TEXT NOT NULL DEFAULT "", `context` TEXT NOT NULL DEFAULT "", - `date_add` datetime NOT NULL DEFAULT NOW() - ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci' + `date_add` datetime NOT NULL DEFAULT NOW(), + PRIMARY KEY (`id_saferpay_log`, `id_log`, `id_shop`), + INDEX (`id_log`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci' ); } From cf80e8cd93fb8fce047d1919a36a47b55b5bf899 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Tue, 1 Oct 2024 15:53:09 +0300 Subject: [PATCH 12/19] [SV-33] updated schema --- upgrade/install-1.2.4.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php index ac08bd24..0350697f 100644 --- a/upgrade/install-1.2.4.php +++ b/upgrade/install-1.2.4.php @@ -31,12 +31,14 @@ function upgrade_module_1_2_4(SaferPayOfficial $module) { return Db::getInstance()->execute( - 'ALTER TABLE ' . _DB_PREFIX_ . SaferPayLog::$definition['table'] . ' - ADD COLUMN `id_log` INTEGER(10) DEFAULT 0, - ADD COLUMN `id_shop` INTEGER(10) DEFAULT 1, - CHANGE `payload` `request` TEXT, - ADD COLUMN `response` TEXT DEFAULT "", - ADD COLUMN `context` TEXT DEFAULT "", - ADD PRIMARY KEY (`id_log`, `id_shop`);' + 'ALTER TABLE ' . _DB_PREFIX_ . pSQL(SaferPayLog::$definition['table']) . ' + ADD COLUMN `id_log` INT(10) DEFAULT 0, + ADD COLUMN `id_shop` INT(10) DEFAULT ' . Configuration::get('PS_SHOP_DEFAULT') . ', + CHANGE `payload` `request` TEXT, + ADD COLUMN `response` TEXT DEFAULT "", + ADD COLUMN `context` TEXT DEFAULT "", + DROP PRIMARY KEY, + ADD PRIMARY KEY (`id_log`, `id_shop`), + ADD INDEX (`id_log`),' ); } From c21c69e3e8cc5f9ce5550f5f3ad14f82ab7c2938 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Tue, 1 Oct 2024 15:55:42 +0300 Subject: [PATCH 13/19] [SV-33] fix --- src/Install/Installer.php | 8 ++++---- upgrade/install-1.2.4.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Install/Installer.php b/src/Install/Installer.php index 69136f0e..681c5e19 100755 --- a/src/Install/Installer.php +++ b/src/Install/Installer.php @@ -303,10 +303,10 @@ private function installSaferPayLog() `id_saferpay_log` INTEGER(10) UNSIGNED AUTO_INCREMENT, `id_log` INT(10) DEFAULT 0, `id_shop` INT(10) DEFAULT ' . Configuration::get('PS_SHOP_DEFAULT') . ', - `message` TEXT NOT NULL DEFAULT "", - `request` TEXT NOT NULL DEFAULT "", - `response` TEXT NOT NULL DEFAULT "", - `context` TEXT NOT NULL DEFAULT "", + `message` TEXT DEFAULT NULL, + `request` MEDIUMTEXT DEFAULT NULL, + `response` MEDIUMTEXT DEFAULT NULL, + `context` TEXT DEFAULT NULL, `date_add` datetime NOT NULL DEFAULT NOW(), PRIMARY KEY (`id_saferpay_log`, `id_log`, `id_shop`), INDEX (`id_log`) diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php index 0350697f..9a268518 100644 --- a/upgrade/install-1.2.4.php +++ b/upgrade/install-1.2.4.php @@ -35,8 +35,8 @@ function upgrade_module_1_2_4(SaferPayOfficial $module) ADD COLUMN `id_log` INT(10) DEFAULT 0, ADD COLUMN `id_shop` INT(10) DEFAULT ' . Configuration::get('PS_SHOP_DEFAULT') . ', CHANGE `payload` `request` TEXT, - ADD COLUMN `response` TEXT DEFAULT "", - ADD COLUMN `context` TEXT DEFAULT "", + ADD COLUMN `response` MEDIUMTEXT DEFAULT NULL, + ADD COLUMN `context` MEDIUMTEXT DEFAULT NULL, DROP PRIMARY KEY, ADD PRIMARY KEY (`id_log`, `id_shop`), ADD INDEX (`id_log`),' From 7f73740fe196301cc2b46e91bdf34793b4a6d288 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Wed, 2 Oct 2024 13:37:03 +0300 Subject: [PATCH 14/19] [SV-33] fix datetime --- src/Install/Installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Install/Installer.php b/src/Install/Installer.php index 681c5e19..a5f673b4 100755 --- a/src/Install/Installer.php +++ b/src/Install/Installer.php @@ -307,7 +307,7 @@ private function installSaferPayLog() `request` MEDIUMTEXT DEFAULT NULL, `response` MEDIUMTEXT DEFAULT NULL, `context` TEXT DEFAULT NULL, - `date_add` datetime NOT NULL DEFAULT NOW(), + `date_add` datetime NOT NULL, PRIMARY KEY (`id_saferpay_log`, `id_log`, `id_shop`), INDEX (`id_log`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci' From 2a9167ea66dbb1bf0f9e2095e4a6efadba91759b Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Wed, 2 Oct 2024 13:37:40 +0300 Subject: [PATCH 15/19] [SV-33] casted default shop value --- src/Install/Installer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Install/Installer.php b/src/Install/Installer.php index a5f673b4..e7b3c727 100755 --- a/src/Install/Installer.php +++ b/src/Install/Installer.php @@ -302,7 +302,7 @@ private function installSaferPayLog() 'CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . pSQL(\SaferPayLog::$definition['table']) . '( `id_saferpay_log` INTEGER(10) UNSIGNED AUTO_INCREMENT, `id_log` INT(10) DEFAULT 0, - `id_shop` INT(10) DEFAULT ' . Configuration::get('PS_SHOP_DEFAULT') . ', + `id_shop` INT(10) DEFAULT ' . (int) Configuration::get('PS_SHOP_DEFAULT') . ', `message` TEXT DEFAULT NULL, `request` MEDIUMTEXT DEFAULT NULL, `response` MEDIUMTEXT DEFAULT NULL, From ce41823c8b34b571078fad3e995ed25f64bf3129 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Wed, 2 Oct 2024 13:38:17 +0300 Subject: [PATCH 16/19] [SV-33] cast --- upgrade/install-1.2.4.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php index 9a268518..ef32a6f3 100644 --- a/upgrade/install-1.2.4.php +++ b/upgrade/install-1.2.4.php @@ -33,7 +33,7 @@ function upgrade_module_1_2_4(SaferPayOfficial $module) return Db::getInstance()->execute( 'ALTER TABLE ' . _DB_PREFIX_ . pSQL(SaferPayLog::$definition['table']) . ' ADD COLUMN `id_log` INT(10) DEFAULT 0, - ADD COLUMN `id_shop` INT(10) DEFAULT ' . Configuration::get('PS_SHOP_DEFAULT') . ', + ADD COLUMN `id_shop` INT(10) DEFAULT ' . (int) Configuration::get('PS_SHOP_DEFAULT') . ', CHANGE `payload` `request` TEXT, ADD COLUMN `response` MEDIUMTEXT DEFAULT NULL, ADD COLUMN `context` MEDIUMTEXT DEFAULT NULL, From d063401787af0de01a4b2f57fe2fec739dfd2e5c Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Wed, 2 Oct 2024 13:39:43 +0300 Subject: [PATCH 17/19] [SV-33] removed classes --- upgrade/install-1.2.4.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php index ef32a6f3..066f249b 100644 --- a/upgrade/install-1.2.4.php +++ b/upgrade/install-1.2.4.php @@ -21,9 +21,6 @@ *@license SIX Payment Services */ -use Invertus\SaferPay\Config\SaferPayConfig; -use Invertus\SaferPay\DTO\Request\RequestHeader; - if (!defined('_PS_VERSION_')) { exit; } From 6910eecc3e95cbc921141e54b39bbd40389cdd53 Mon Sep 17 00:00:00 2001 From: Marijus <106698165+MarijusCoding@users.noreply.github.com> Date: Wed, 2 Oct 2024 14:15:41 +0300 Subject: [PATCH 18/19] Update composer.json Co-authored-by: Gytautas Zumaras <96050852+GytisZum@users.noreply.github.com> --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8f43ad93..7f887c40 100755 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "type": "vcs", "url": "https://github.com/Invertus/Knapsack.git" }, - "0": { + "lock": { "type": "vcs", "url": "https://github.com/Invertus/lock.git", "no-api": true From 7ba3bdec715c2d60207bda5952701b0ad19d4e99 Mon Sep 17 00:00:00 2001 From: MarijusCoding Date: Wed, 2 Oct 2024 14:16:56 +0300 Subject: [PATCH 19/19] [SV-33] fixed db --- upgrade/install-1.2.4.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/install-1.2.4.php b/upgrade/install-1.2.4.php index 066f249b..e3ced5e0 100644 --- a/upgrade/install-1.2.4.php +++ b/upgrade/install-1.2.4.php @@ -35,7 +35,7 @@ function upgrade_module_1_2_4(SaferPayOfficial $module) ADD COLUMN `response` MEDIUMTEXT DEFAULT NULL, ADD COLUMN `context` MEDIUMTEXT DEFAULT NULL, DROP PRIMARY KEY, - ADD PRIMARY KEY (`id_log`, `id_shop`), + PRIMARY KEY (`id_saferpay_log`, `id_log`, `id_shop`), ADD INDEX (`id_log`),' ); }