diff --git a/Api/Token.php b/Api/Token.php index 9c0ec64..8d1fbd4 100644 --- a/Api/Token.php +++ b/Api/Token.php @@ -188,23 +188,23 @@ public function getToken($cartId, $method, $customerData) private function doRequest($data) { try { - $httpHeaders = new \Zend\Http\Headers(); + $httpHeaders = new \Laminas\Http\Headers(); $httpHeaders->addHeaders([ 'User-Agent' => 'Magento 2 CMS', 'Accept' => 'application/json', 'Content-Type' => 'application/json' ]); - $request = new \Zend\Http\Request(); + $request = new \Laminas\Http\Request(); $request->setHeaders($httpHeaders); $request->setUri('https://api.fondy.eu/api/checkout/token/'); - $request->setMethod(\Zend\Http\Request::METHOD_POST); + $request->setMethod(\Laminas\Http\Request::METHOD_POST); $params = json_encode(['request' => $data]); $request->setContent($params); - $client = new \Zend\Http\Client(); + $client = new \Laminas\Http\Client(); $options = [ - 'adapter' => 'Zend\Http\Client\Adapter\Curl', + 'adapter' => 'Laminas\Http\Client\Adapter\Curl', 'curloptions' => [CURLOPT_FOLLOWLOCATION => true], 'maxredirects' => 1, 'timeout' => 30 diff --git a/Controller/Url/Submit.php b/Controller/Url/Submit.php index 922e27d..b7304d1 100644 --- a/Controller/Url/Submit.php +++ b/Controller/Url/Submit.php @@ -89,23 +89,23 @@ public function validateForCsrf(RequestInterface $request): bool private function doRequest($data) { try { - $httpHeaders = new \Zend\Http\Headers(); + $httpHeaders = new \Laminas\Http\Headers(); $httpHeaders->addHeaders([ 'User-Agent' => 'Magento 2 CMS', 'Accept' => 'application/json', 'Content-Type' => 'application/json' ]); - $request = new \Zend\Http\Request(); + $request = new \Laminas\Http\Request(); $request->setHeaders($httpHeaders); $request->setUri('https://api.fondy.eu/api/checkout/url/'); - $request->setMethod(\Zend\Http\Request::METHOD_POST); + $request->setMethod(\Laminas\Http\Request::METHOD_POST); $params = json_encode(['request' => $data]); $request->setContent($params); - $client = new \Zend\Http\Client(); + $client = new \Laminas\Http\Client(); $options = [ - 'adapter' => 'Zend\Http\Client\Adapter\Curl', + 'adapter' => 'Laminas\Http\Client\Adapter\Curl', 'curloptions' => [CURLOPT_FOLLOWLOCATION => true], 'maxredirects' => 1, 'timeout' => 30 diff --git a/Model/Fondy.php b/Model/Fondy.php index 2fc92db..ffbc5b7 100755 --- a/Model/Fondy.php +++ b/Model/Fondy.php @@ -87,8 +87,8 @@ public function __construct( $resource, $resourceCollection, $data); - $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/fondy.log'); - $this->_logger = new \Zend\Log\Logger(); + $writer = new \Laminas\Log\Writer\Stream(BP . '/var/log/fondy.log'); + $this->_logger = new \Laminas\Log\Logger(); $this->_logger->addWriter($writer); $this->_gateUrl = 'https://api.fondy.eu/api/checkout/redirect/'; } diff --git a/Model/FondyDirect.php b/Model/FondyDirect.php index ca11404..b68a790 100644 --- a/Model/FondyDirect.php +++ b/Model/FondyDirect.php @@ -83,8 +83,8 @@ public function __construct( $resourceCollection, $data ); - $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/fondy_direct.log'); - $this->_logger = new \Zend\Log\Logger(); + $writer = new \Laminas\Log\Writer\Stream(BP . '/var/log/fondy_direct.log'); + $this->_logger = new \Laminas\Log\Logger(); $this->_logger->addWriter($writer); $this->_minAmount = $this->getConfigData('min_order_total'); diff --git a/composer.json b/composer.json index 0e33452..eb3fcf2 100644 --- a/composer.json +++ b/composer.json @@ -1,45 +1,49 @@ { - "name": "cloudipsp/magento2", - "description": "Fondy Magento 2 payment module", - "type": "magento2-module", - "version": "1.2.9.2", - "license": [ - "OSL-3.0", - "AFL-3.0" - ], - "authors": [ - { - "name": "DM", - "email": "support@fondy.eu", - "homepage": "https://fondy.eu" - } - ], - "keywords": [ - "magento2_module", - "magento2_payment_module", - "payment_gateway", - "magento2_payment_gateway", - "payment_processing", - "magento2_payment_processing", - "e-commerce", - "visa", - "mastercard", - "debit_card", - "credit_card", - "authorize", - "capture", - "recurring", - "refund", - "3d-secure", - "fraud" - ], - "require": { - "php": "~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0" - }, - "autoload": { - "files": [ "registration.php" ], - "psr-4": { - "Fondy\\Fondy\\": "" + "name": "cloudipsp/magento2", + "description": "Fondy Magento 2 payment module", + "type": "magento2-module", + "version": "1.2.9.3", + "license": [ + "OSL-3.0", + "AFL-3.0" + ], + "authors": [ + { + "name": "DM", + "email": "support@fondy.eu", + "homepage": "https://fondy.eu" + } + ], + "keywords": [ + "magento2_module", + "magento2_payment_module", + "payment_gateway", + "magento2_payment_gateway", + "payment_processing", + "magento2_payment_processing", + "e-commerce", + "visa", + "mastercard", + "debit_card", + "credit_card", + "authorize", + "capture", + "recurring", + "refund", + "3d-secure", + "fraud" + ], + "require": { + "php": "~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0", + "laminas/laminas-dependency-plugin": "^2.1", + "laminas/laminas-log": "^2.13" + }, + "autoload": { + "files": [ + "registration.php" + ], + "psr-4": { + "Fondy\\Fondy\\": "" + } } - } }