Search by

two-inc / magento2-hyva-checkout

two

There is no license information available for the latest version (3.0.0) of this package.

Two Inc Payment Method in Hyva Checkout

Package info

github.com/two-inc/magento-hyva-extension

Language:JavaScript

Type:magento2-module

pkg:composer/two-inc/magento2-hyva-checkout

Statistics

Installs: 1 219

Dependents: 0

Suggesters: 0

Stars: 1

3.0.0 2026-09-23 16:21 UTC

README

  • Two Gateway Module Version: 3.1.0

Introduction

This document provides instructions for installing the Two Gateway Payment Method module with Hyvä Checkout compatibility for Magento 2. This module ensures a seamless payment experience for stores using the Hyvä frontend.

Compatibility

Component Version Link
Magento 2.4.x Release Notes
Two Gateway Module ^2.3.0 two-inc/magento-plugin
Hyvä Checkout ^1.2 Hyvä Checkout

Prerequisites

  • Hyvä Theme and Hyvä Checkout module installed.
  • Access to the Hyvä private composer repository.
  • Node.js and Tailwind dependencies installed for building CSS.

Installation Steps

1. Install Hyvä Theme & Checkout (if not already installed)

Use composer to install the necessary Hyvä packages:

composer config repositories.private-packagist composer {repositories path}
composer config --auth http-basic.hyva-themes.repo.packagist.com token {token}
composer require hyva-themes/magento2-default-theme
composer require hyva-themes/magento2-hyva-checkout

2. Configure Hyvä Checkout

Configure basic settings via the Magento Admin: Admin > Stores > Settings > Configuration > Hyvä Themes > Checkout

3. Install Two Gateway Hyva Module

  1. Download and extract the module's ZIP package.
  2. Connect to your Magento server.
  3. Upload the module files to app/code/Two/GatewayHyva.

4. Run Magento Commands

Execute the following commands from your Magento root directory:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush

5. Generate Hyvä Configuration

Run the Hyvä configuration generator:

php bin/magento hyva:config:generate

6. Build Tailwind CSS (Optional: If using custom styles)

For custom Hyvä themes:

npm --prefix app/design/frontend/<Vendor>/<Theme>/web/tailwind run ci
npm --prefix app/design/frontend/<Vendor>/<Theme>/web/tailwind run build-prod

For the default Hyvä theme:

npm --prefix vendor/hyva-themes/magento2-default-theme/web/tailwind run ci
npm --prefix vendor/hyva-themes/magento2-default-theme/web/tailwind run build-prod

7. Configure Two Gateway

Set up your Two Gateway credentials and settings in the Magento Admin: Admin > Stores > Configuration > Two Gateway

Product page promo message and "Buy with" button

The base module's product page promo message and "Buy with " button are off by default and switched on separately in the Two Gateway configuration. Both work on Hyvä themes with no further setup. On Hyvä themes this module places both beneath the add-to-cart controls in the product information column, the button directly above the promo message as on Luma, and sizes their text to the theme's body text; Luma keeps the base module's placement and sizes. It also gives the button a Hyvä template (Luma keeps the base module's) that adds the product to the basket with the options and quantity chosen in the product form, then takes the buyer to checkout. In Hyvä Checkout the brand's payment method is then preselected, once, unless the buyer picks a method first or the method is not offered for the basket. The brand's name and texts come from the base module, as on Luma.

Testing

  1. Check the module is enabled: php bin/magento module:status | grep Two_GatewayHyva
  2. Navigate to your store's frontend checkout page
  3. Verify that the Two Gateway payment method is visible
  4. Place a test order to ensure everything is working correctly

Troubleshooting

  • Ensure Hyvä theme is properly installed
  • Check Magento logs: var/log/system.log and var/log/exception.log
  • Verify CSP (Content Security Policy) settings if scripts are blocked
  • Clear all caches after installation

Development

For developers looking to extend or customize the Two Gateway Hyva module, follow these steps:

  1. Install direnv and uv and configure .envrc file with layout python.
  2. Install the required tools and dependencies:
direnv allow
uv tool install bumpver
uv tool install pre-commit
pre-commit install