LokiCheckout_Worldline
This Magento 2 module is an add-on package to the LokiCheckout.
Installation
Install this package via composer:
composer require loki-checkout/magento2-worldline
Next, enable this module:
bin/magento module:enable LokiCheckout_Worldline
Supported payment methods
| Method | Behaviour |
|---|---|
| worldline_hosted_checkout | Redirect to the Worldline hosted checkout |
| worldline_redirect_payment_<productId> | Redirect to a single Worldline payment product |
| worldline_cc | Credit card through the Worldline hosted-tokenization iframe |
Stored cards (the *_vault methods) are not supported yet and are hidden from the payment method
list by LokiCheckout\Worldline\Plugin\AvailableMethodsFilterPlugin.
How the order is placed
Worldline does not place the Magento order during checkout. BaseCreatePaymentManagement saves the
payment information, reserves an order id, deactivates the quote and preserves it for restoration;
the order is only created once the shopper returns through worldline/returns/*.
LokiCheckout\Worldline\Service\CreatePaymentService therefore replaces the order placement of
LokiCheckout\Core\Step\FinalStep. The payment component throws a
Loki\Components\Exception\RedirectException, which Loki turns into a JSON redirect, so the
checkout never reaches its own placeOrder() call.
This module also replaces the worldline/returns/waiting and worldline/returns/pendingpayment
templates, whose Knockout-based polling never starts on a Hyvä theme.
Regenerating the payment method wiring
Worldline registers one Magento payment method per payment product, so etc/loki_components.xml
and view/frontend/layout/loki_checkout_block_payment_methods.xml list every method individually.
When worldline/module-magento-payment-redirect-payment adds a payment product, add a
worldline_redirect_payment_<productId> entry to both files.
Configuration
The Worldline core modules need these settings (Stores > Configuration > Worldline Connection):
| Path | Value |
|---|---|
| worldline_connection/connection/environment_mode | 0 (test) or 1 (production) |
| worldline_connection/connection/merchant_id | Merchant ID (PSPID) |
| worldline_connection/connection/api_key | API Key ID |
| worldline_connection/connection/api_secret | API Secret (stored encrypted) |
| payment/<method>/active | 1 for every method to offer |
Without a merchant ID, API key and API secret, Worldline hides all of its payment methods. Webhooks
are optional: when Worldline cannot reach the shop, the order is created once the shopper returns
through worldline/returns/*.
Development without Worldline credentials
loki-checkout/magento2-worldline-dev-tools replaces the Worldline API with local stubs and serves
a stand-in for the hosted payment page, which is what the Playwright tests use.
Testing against the Worldline sandbox
The sandbox tests (Test/Integration/Sandbox and Test/Playwright/sandbox-test.spec.ts) read
these variables from the environment, or from .env.loki-functional-tests in the Magento root:
| Variable | Configuration |
|---|---|
| WORLDLINE_TEST_MERCHANT_ID | worldline_connection/connection/merchant_id |
| WORLDLINE_TEST_ACCESS_TOKEN | worldline_connection/connection/api_key |
| WORLDLINE_TEST_SECRET_TOKEN | worldline_connection/connection/api_secret |
| WORLDLINE_TEST_API_KEY | worldline_connection/webhook/key |
They first call the Worldline testconnection endpoint, and are skipped (with the reason) when the
credentials are missing or rejected. The credentials have to be created in the Merchant Portal of
the preprod environment.
Current status
Support
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/LokiCheckout_Worldline.git
Loki Components
The following LokiComponents are created or references in this module:
loki-checkout.payment.methods.worldline_cc.form
loki-checkout.payment.methods.worldline_hosted_checkout.form
loki-checkout.payment.methods.worldline_redirect_payment_1.form
loki-checkout.payment.methods.worldline_redirect_payment_117.form
loki-checkout.payment.methods.worldline_redirect_payment_125.form
loki-checkout.payment.methods.worldline_redirect_payment_130.form
loki-checkout.payment.methods.worldline_redirect_payment_132.form
loki-checkout.payment.methods.worldline_redirect_payment_2.form
loki-checkout.payment.methods.worldline_redirect_payment_3.form
loki-checkout.payment.methods.worldline_redirect_payment_3012.form
loki-checkout.payment.methods.worldline_redirect_payment_302.form
loki-checkout.payment.methods.worldline_redirect_payment_3111.form
loki-checkout.payment.methods.worldline_redirect_payment_3112.form
loki-checkout.payment.methods.worldline_redirect_payment_3124.form
loki-checkout.payment.methods.worldline_redirect_payment_320.form
loki-checkout.payment.methods.worldline_redirect_payment_3301.form
loki-checkout.payment.methods.worldline_redirect_payment_3302.form
loki-checkout.payment.methods.worldline_redirect_payment_3303.form
loki-checkout.payment.methods.worldline_redirect_payment_3304.form
loki-checkout.payment.methods.worldline_redirect_payment_3305.form
loki-checkout.payment.methods.worldline_redirect_payment_5001.form
loki-checkout.payment.methods.worldline_redirect_payment_5003.form
loki-checkout.payment.methods.worldline_redirect_payment_5100.form
loki-checkout.payment.methods.worldline_redirect_payment_5110.form
loki-checkout.payment.methods.worldline_redirect_payment_5125.form
loki-checkout.payment.methods.worldline_redirect_payment_5300.form
loki-checkout.payment.methods.worldline_redirect_payment_5402.form
loki-checkout.payment.methods.worldline_redirect_payment_5403.form
loki-checkout.payment.methods.worldline_redirect_payment_5404.form
loki-checkout.payment.methods.worldline_redirect_payment_5405.form
loki-checkout.payment.methods.worldline_redirect_payment_5406.form
loki-checkout.payment.methods.worldline_redirect_payment_5407.form
loki-checkout.payment.methods.worldline_redirect_payment_5408.form
loki-checkout.payment.methods.worldline_redirect_payment_5500.form
loki-checkout.payment.methods.worldline_redirect_payment_56.form
loki-checkout.payment.methods.worldline_redirect_payment_5600.form
loki-checkout.payment.methods.worldline_redirect_payment_5700.form
loki-checkout.payment.methods.worldline_redirect_payment_771.form
loki-checkout.payment.methods.worldline_redirect_payment_809.form
loki-checkout.payment.methods.worldline_redirect_payment_840.form
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
LokiCheckout_Core
Loki_Base
Loki_Components
Loki_CssUtils
Loki_FieldComponents
Magento_AdminNotification
Magento_Backend
Magento_Catalog
Magento_CatalogInventory
Magento_Checkout
Magento_CheckoutAgreements
Magento_Cms
Magento_Config
Magento_Csp
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Email
Magento_Indexer
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Rule
Magento_Sales
Magento_SalesRule
Magento_SalesSequence
Magento_Shipping
Magento_Store
Magento_Tax
Magento_Theme
Magento_Ui
Magento_User
Magento_Variable
Magento_Vault
Magento_Widget
Worldline_CreditCard
Worldline_HostedCheckout
Worldline_PaymentCore
Worldline_RedirectPayment
Yireo_CspUtilities
Composer details
LokiCheckout_Worldlineloki-checkout/magento2-worldline
ext-pcre: *
loki-checkout/magento2-core: ^2.0
loki/magento2-components: ^2.0
loki/magento2-css-utils: ^1.0
loki/magento2-field-components: ^2.0
magento/framework: ^103.0
magento/module-payment: ^100.0
magento/module-quote: ^101.0
magento/module-store: ^101.0
php: >=8.2 <8.6
wl-online-payments-direct/sdk-php: >=8.0
worldline/module-magento-payment-core: >=2.50
worldline/module-magento-payment-credit-card: >=1.50
worldline/module-magento-payment-hosted-checkout: >=1.50
worldline/module-magento-payment-redirect-payment: >=1.50
yireo/magento2-csp-utilities: ^1.0
Releases
| 0.0.1 | 10 November 2026 |
Changelog
[0.0.1] - 30 October 2026
Added
- Support for
worldline_hosted_checkoutand allworldline_redirect_payment_<productId>methods, converted from the Hyvä Checkout moduleworldline/module-magento-theme-hyva. - Support for
worldline_ccthrough the Worldline hosted-tokenization iframe, including the surcharge calculation. Payment/Icon/IconResolverrendering the Worldline payment product, credit card and hosted checkout icons.Plugin/AvailableMethodsFilterPluginhiding payment products that are inactive or unavailable, the umbrellaworldline_redirect_paymentmethod and all vault methods.- Alpine replacements for the
worldline/returns/waitingandworldline/returns/pendingpaymentpages, whose Knockout polling never starts on a Hyvä theme. Step/FinalStep/Task/PreventUnpaidWorldlineOrderTaskas a server-side guarantee that an order can never be placed for a Worldline method that has no Worldline payment attached.
Fixed
- The payment method filter fetched the Worldline payment product list once per payment method, which turned a failing or slow Worldline API call into dozens of blocking requests and stalled the payment step. The list is now fetched once per payment method list.
Removed
Payment/Redirect/RedirectResolver, which can never run: Worldline creates the order after the shopper returns, so Loki Checkout never places an order for a Worldline payment.