diff --git a/README.md b/README.md index c54547ca..dc79573d 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ We strongly encourage you to join us in contributing to this repository so every Read our [**contribution guidelines**](CONTRIBUTING.md) to find out how. ## Requirements -This plugin supports PrestaShop versions 1.7.5.0 and up. +This plugin supports PrestaShop versions 1.7.5.0 to 8.1.2. ## Documentation Please find the relevant documentation for diff --git a/src/adyenofficial.php b/src/adyenofficial.php index c838d4c2..ac89d98d 100755 --- a/src/adyenofficial.php +++ b/src/adyenofficial.php @@ -46,11 +46,11 @@ public function __construct() { $this->name = 'adyenofficial'; $this->tab = 'payments_gateways'; - $this->version = '5.0.9'; + $this->version = '5.1.0'; $this->author = $this->l('Adyen'); $this->need_instance = 0; - $this->ps_versions_compliancy = ['min' => '1.7.5.0', 'max' => _PS_VERSION_]; + $this->ps_versions_compliancy = ['min' => '1.7.5.0', 'max' => '8.1.2']; $this->bootstrap = true; parent::__construct(); @@ -1393,11 +1393,11 @@ private function displayTabContent(int $orderId): string $transactionDetails = \AdyenPayment\Classes\Services\TransactionDetailsHandler::getTransactionDetails($order); $reversedDetails = array_reverse($transactionDetails); - $authorisationDetail = $reversedDetails[array_search( + $authorisationDetail = !empty($reversedDetails) ? $reversedDetails[array_search( \Adyen\Webhook\EventCodes::AUTHORISATION, array_column($reversedDetails, 'eventCode'), true - )]; + )] : []; $lastDetail = end($transactionDetails); $generalSettings = \Adyen\Core\BusinessLogic\AdminAPI\AdminAPI::get()->generalSettings((string)\Context::getContext()->shop->id)->getGeneralSettings(); @@ -1424,7 +1424,7 @@ private function displayTabContent(int $orderId): string 'orderId' => $orderId, 'adyenLink' => $authorisationDetail['viewOnAdyenUrl'] ?? '', 'refundSupported' => $authorisationDetail['refund'] ?? false, - 'adyenPaymentLink' => $authorisationDetail['paymentLink'], + 'adyenPaymentLink' => $authorisationDetail['paymentLink'] ?? '', 'adyenGeneratePaymentLink' => $this->getAction('AdyenPaymentLink', 'generatePaymentLink', ['ajax' => true]), 'shouldDisplayPaymentLink' => $authorisationDetail['displayPaymentLink'] ?? false, 'isAdyenOrder' => $order->module === $this->name, diff --git a/src/composer.json b/src/composer.json index 35ac3b84..ebcab853 100755 --- a/src/composer.json +++ b/src/composer.json @@ -41,7 +41,7 @@ "php": "^7.2|^7.4|^8.0", "ext-json": "*", "ext-zip": "*", - "adyen/integration-core": "dev-cr-04", + "adyen/integration-core": "1.1.0", "ext-simplexml": "*", "ext-openssl": "*" }, diff --git a/src/composer.lock b/src/composer.lock index 7afcd323..aac3e43b 100755 --- a/src/composer.lock +++ b/src/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "d4c6569a71be887e72dfa4ef387a403d", + "content-hash": "73d2e551e8fd13609757e3de2b9a9997", "packages": [ { "name": "adyen/integration-core", - "version": "dev-cr-04", + "version": "1.1.0", "source": { "type": "git", "url": "git@github.com:Adyen/adyen-php-plugin-core.git", - "reference": "130a789e890045180cd061912a8938669992fdc7" + "reference": "38dd72139b8e15499e40fdde95998fb088c30e08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Adyen/adyen-php-plugin-core/zipball/130a789e890045180cd061912a8938669992fdc7", - "reference": "130a789e890045180cd061912a8938669992fdc7", + "url": "https://api.github.com/repos/Adyen/adyen-php-plugin-core/zipball/38dd72139b8e15499e40fdde95998fb088c30e08", + "reference": "38dd72139b8e15499e40fdde95998fb088c30e08", "shasum": "" }, "require": { @@ -48,7 +48,7 @@ "proprietary" ], "description": "Core Adyen integration library", - "time": "2023-12-04T10:33:22+00:00" + "time": "2023-12-05T10:10:56+00:00" }, { "name": "adyen/php-webhook-module", @@ -1512,9 +1512,7 @@ ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "adyen/integration-core": 20 - }, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { diff --git a/src/views/templates/front/stored-methods.tpl b/src/views/templates/front/stored-methods.tpl index 90d8edc4..11026b29 100644 --- a/src/views/templates/front/stored-methods.tpl +++ b/src/views/templates/front/stored-methods.tpl @@ -76,7 +76,7 @@