Skip to content

Commit

Permalink
Merge pull request #886 from mollie/PIPRES-405
Browse files Browse the repository at this point in the history
Changes so twint and Blik work successfully
  • Loading branch information
JevgenijVisockij authored Mar 4, 2024
2 parents 89f0450 + 2cbd24c commit b4fdbca
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
4 changes: 3 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
10 changes: 9 additions & 1 deletion src/Service/ApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b4fdbca

Please sign in to comment.