LokiCheckout_Worldline

This module is available free of charge as part of Loki Checkout. Please note that support for this module is not included and is available on an hourly basis.
Payment
PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
Unit Tests 27
Functional Tests 3
PHPStan 1
Magento PHPCS 10

Magento version PHP version License Latest Version

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. Regenerate both after upgrading worldline/module-magento-payment-redirect-payment:

php dev/generate-payment-method-xml.php vendor/worldline/module-magento-payment-redirect-payment
bin/magento cache:flush config

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.

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation

WARNING: This module has no releases yet. If you want to use it, make sure to add the version @dev to the composer command.

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
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 Loki_MapComponents Magento_Backend Magento_Catalog Magento_Checkout Magento_CheckoutAgreements Magento_Config Magento_Customer Magento_Directory Magento_Eav Magento_Newsletter Magento_Payment Magento_Quote Magento_Sales Magento_Shipping Magento_Store Magento_Tax Magento_Vault Worldline_PaymentCore Worldline_CreditCard Worldline_HostedCheckout Worldline_RedirectPayment Yireo_CspUtilities
Composer details
Magento module name
LokiCheckout_Worldline
Composer name
loki-checkout/magento2-worldline
Composer version
No release yet
Default branch
main
Requirements
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-checkout: ^100.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
Changelog

Added

  • Support for worldline_hosted_checkout and all worldline_redirect_payment_<productId> methods, converted from the Hyvä Checkout module worldline/module-magento-theme-hyva.
  • Support for worldline_cc through the Worldline hosted-tokenization iframe, including the surcharge calculation.
  • Payment/Icon/IconResolver rendering the Worldline payment product, credit card and hosted checkout icons.
  • Plugin/AvailableMethodsFilterPlugin hiding payment products that are inactive or unavailable, the umbrella worldline_redirect_payment method and all vault methods.
  • Alpine replacements for the worldline/returns/waiting and worldline/returns/pendingpayment pages, whose Knockout polling never starts on a Hyvä theme.
  • dev/generate-payment-method-xml.php to regenerate the per-payment-method component and layout wiring.
  • Step/FinalStep/Task/PreventUnpaidWorldlineOrderTask as 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.

Last modified: June 19, 2026