V3 - mollie/magento2 GitHub Wiki
We are happy to present the most significant update to the Mollie Magento 2 extension to date. This document describes what's new and what's changed. What you should do to updated and what breaking changes are introduced.
Overview
- Minimum PHP raised to >= 8.1 (dropped PHP 7.3 and 7.4).
- Upgraded dependency to mollie/mollie-api-php V3 (typed request/response API).
- Removed Orders API integration; Payments API is now used exclusively.
- Queue-based transaction processing enabled by default.
- E2E tests migrated from Cypress to Playwright
- Payment Method configuration updated.
- Increased PHPStan and PHP Codesniffer levels
Requirements
- PHP: >= 8.1
- mollie/mollie-api-php: ^3.3
Breaking Changes
-
Update of
mollie/mollie-api-phpto ^3.3 -
Orders API support removed
- Removed Orders API client and wrappers: all classes under
Model/Client/Orders/*andService/Mollie/Wrapper/OrdersEndpointWrapper.phpare deleted. - All transaction creation now goes through the Payments API (
Model/Client/Payments). - Custom code relying on Orders API classes or response shapes must be refactored to use the Payments API flow.
- Removed Orders API client and wrappers: all classes under
-
PHP 7.3/7.4 dropped; PHP 8.1+ required
-
Removed deprecations
-
Removal of Klarna Pay Later, Klarna Pay Now & Klarna Slice it
- For old orders that need to be refunded, please use the Mollie Dashboard.
Changes
Orders API removal
Mollie has two ways of creating transactions on the platform: Using the Payments API or using the Orders API. The Orders API was introduced to handle more complex (Buy Now Pay Later) payment methods like Klarna and Riverty. These methods need to know each item that is ordered separatly, while the Payments API only required an amount.
A while ago, Mollie deprecated the Orders API, and added support for these order lines in the Payments API. The release of version 3.0 of the mollie/mollie-api-php library removed all support for the Orders API. As the Magento extension builds upon this library, it was a logical step to remove the support for the Orders API too.
Removal of old Klarna methods
Since the introduction of the Klarna method (mollie_methods_klarna), the other Klarna methods are deprecated (klarnapaylater, klarnapaynow, klarnasliceit). As we have removed support for the Orders API, it was a good moment to remove these methods too, as the Payments API doesn't have support for it. If you need to refund orders created using one of these legacy methods, please do that through the Mollie dashboard.
Drop support for PHP 7.4 and 7.3
These PHP versions reached their end of life about three years ago, but where still supported by this extension. As it's barely used anymore, we decided to remove support for it.
This opened the door for us to introduce more strict return types and type hints. That should improve overall reliability.
Enhanced Admin Configuration UI
The Mollie configuration got a big update. The payment method configuration has been restyled. Instead of a long list, each method now is shown as a tile. On top of that, you can directly see which methods are enabled by a color indication.
We also moved a few settings to a new "Order Management" group. We renamed "Advanced" to "Developer Settings".
Queueing is the default
When the webhook from Mollie comes in on a Magento shop, a lot of things happen in a short time. The confirmation email is sent, invoices get created, and this is also emailed to the client. Especially on busy webshops and webshops with a lot of extensions, this sometimes can take a bit too long, causing the update from Mollie's point of view to be "failed".
To mitigate this issue, we introduced well over a year ago a queueing option for order processing. This allowed webhooks to be handled faster when a status updated of the order came in. This option lived behind a feature flag.
After being battle tested by a lot of merchants, we decided to upgrade this to be the default. The option still exists, so you always switch back to synchronous processing.
If you have a consumer whitelist configured, make sure to add mollie.transaction.process. You can run the self test to validate if everything is configured correctly.
Move from Cypress to Playwright
We started using Cypress for End-2-End test a few years ago, and it was great. It catched quite a few bugs that all other tests failed to catch. So we were happy. But as time continued, we bumped into a lot of papercuts. Simple things that you need to install a plugins for (hovering over an element), a hard to understand javascript implementation, and the most annoying of all: hard to debug CI feedback.
That's why we converted the whole test suite to Playwright, and so far it's great. Nothing seems impossible using Playwright, and the trace collected in CI is great for debugging purposes. To top that off, Playwright supports sharding over multiple runners, recuding the End-2-End feedback loop from well over an hour to about 20 minutes.
Per-Method Capture Mode Configuration
New Feature:
Payment methods that support authorization/capture now have individual capture mode settings instead of a single global setting.
Affected Payment Methods:
- Billie
- Credit Card
- MobilePay
- Klarna
- Vipps
Notes
If you need help adapting a customization from Orders API to Payments API, share the relevant code and we’ll suggest a concrete refactor.