diff --git a/changelog.md b/changelog.md index b56553f5a..2f558f73b 100644 --- a/changelog.md +++ b/changelog.md @@ -2,11 +2,13 @@ # Changelog # +## Changes in release 6.1.0 ## ++ New payment methods: Twint, Blik. + ## Changes in release 6.0.5 ## + Recurring order options are now in "Subscriptions" tab + Implemented atomic action protection for Mollie API callbacks + Overall improvements and bug fixes -+ Added PrestaShop CloudSync support ## Changes in release 6.0.4 ## + New payment method: Billie. diff --git a/composer.json b/composer.json index cb2569150..dcfdcb4d3 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "ext-json": "*", "ext-simplexml": "*", "prestashop/decimal": "^1.3", - "mollie/mollie-api-php": "v2.61.0", + "mollie/mollie-api-php": "v2.65.0", "segmentio/analytics-php": "^1.5", "sentry/sentry": "3.17.0", "league/container": "2.5.0", diff --git a/mollie.php b/mollie.php index b6d1d4900..ba3a8f1ff 100755 --- a/mollie.php +++ b/mollie.php @@ -85,7 +85,7 @@ public function __construct() { $this->name = 'mollie'; $this->tab = 'payments_gateways'; - $this->version = '6.0.5'; + $this->version = '6.1.0'; $this->author = 'Mollie B.V.'; $this->need_instance = 1; $this->bootstrap = true; diff --git a/src/Config/Config.php b/src/Config/Config.php index 2ce23d4e1..94f9eeb14 100644 --- a/src/Config/Config.php +++ b/src/Config/Config.php @@ -314,6 +314,8 @@ class Config 'klarnapaynow' => 'Klarna Pay now.', 'in3' => 'in3', 'billie' => 'Billie', + 'twint' => 'TWINT', + 'blik' => 'BLIK', ]; const MOLLIE_BUTTON_ORDER_TOTAL_REFRESH = 'MOLLIE_BUTTON_ORDER_TOTAL_REFRESH'; diff --git a/src/Service/ApiService.php b/src/Service/ApiService.php index ce72e8e42..09ecdb344 100644 --- a/src/Service/ApiService.php +++ b/src/Service/ApiService.php @@ -19,6 +19,7 @@ use Mollie\Api\Exceptions\ApiException; use Mollie\Api\MollieApiClient; use Mollie\Api\Resources\BaseCollection; +use Mollie\Api\Resources\Method; use Mollie\Api\Resources\MethodCollection; use Mollie\Api\Resources\Order as MollieOrderAlias; use Mollie\Api\Resources\Payment; @@ -116,9 +117,16 @@ public function getMethodsForConfig(MollieApiClient $api) { $notAvailable = []; try { + /** Requires local param or fails */ /** @var BaseCollection|MethodCollection $apiMethods */ - $apiMethods = $api->methods->allActive(['resource' => 'orders', 'include' => 'issuers', 'includeWallets' => 'applepay']); + $apiMethods = $api->methods->allAvailable(['locale' => '']); $apiMethods = $apiMethods->getArrayCopy(); + /** @var Method $method */ + foreach ($apiMethods as $key => $method) { + if ($method->status !== 'activated') { + unset($apiMethods[$key]); + } + } } catch (Exception $e) { $errorHandler = \Mollie\Handler\ErrorHandler\ErrorHandler::getInstance(); $errorHandler->handle($e, $e->getCode(), false);