Install the module¶
Install the module in a test copy of the shop first. Back up the database, files and Composer lock file. Run the commands as the Magento filesystem owner using the PHP version appropriate for the installation. Follow your hosting environment's existing maintenance, cron and worker procedures.
The commands below run from the Magento project root. Replace the locale examples with the languages deployed by your shop. For a production change, enable maintenance before modifying the installation and disable it only after successful checks.
Composer installation¶
- Sign in to your mame account and open Downloads > Saferpay for Magento 2 > Installation & updates.
- Select the Standard/Luma installation. Create Composer access using a valid module license that you own. Save the password, which is shown only once, in your password manager. It is separate from the Magento payment API credentials.
- Configure the repository and install the core package:
composer config repositories.mame composer https://mamedev.ch/api/composer/magento
composer require "mamedev/module-saferpay:^1.0"
Composer requests HTTP Basic credentials when required. Use the username and password shown in step 2. Store them in an untracked auth.json or your deployment secret store. Do not include passwords in shared commands, screenshots or Git.
- Enable and deploy the module:
php bin/magento module:enable Mame_Saferpay
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f de_CH en_US
php bin/magento cache:flush
php bin/magento module:status Mame_Saferpay
Composer selects a compatible registered version and records it in composer.lock. Keep the lock file in the shop's normal deployment workflow. Complete the Website connection after installation.
ZIP installation¶
- Download the core module ZIP from Downloads in the license owner's account. Only use a verified package you are entitled to download.
- Extract the archive outside the public web root. Copy the contents of
module-saferpay/toapp/code/Mame/Saferpay/. The fileapp/code/Mame/Saferpay/registration.phpmust then exist. Avoid an extra nestedmodule-saferpaydirectory. - Run the activation and deployment commands above.
Use either Composer or a copy under app/code for each module. Do not install the same module in both places. A change of installation method should follow a tested deployment process. The module's configuration and database records are retained.
Hyvä Theme (optional)¶
Install and configure the separately licensed Hyvä Theme first, including its required GraphQL modules. Use Hyvä's official installation guide for the theme itself.
Install the Saferpay Theme compatibility package:
composer require "mamedev/module-saferpay:^1.0" "mamedev/module-saferpay-hyva:^1.0"
php bin/magento module:enable Mame_Saferpay Mame_SaferpayHyva
php bin/magento setup:upgrade
php bin/magento hyva:config:generate
Rebuild your active child theme's Tailwind CSS using that theme's supported Node version and scripts. For a theme with build-prod:
HYVA_TAILWIND_DIR=/absolute/path/to/your/child-theme/web/tailwind
npm --prefix "$HYVA_TAILWIND_DIR" ci
npm --prefix "$HYVA_TAILWIND_DIR" run build-prod
Then run Magento DI compilation, static deployment and cache refresh. The directory must refer to the actual theme used by the Website. Building an unrelated parent theme does not update your child theme.
Hyvä Checkout (optional)¶
Install and license Hyvä Checkout separately using Hyvä's official Checkout guide.
composer require "mamedev/module-saferpay:^1.0" "mamedev/module-saferpay-hyva:^1.0" "mamedev/module-saferpay-hyva-checkout:^1.0"
php bin/magento module:enable Mame_Saferpay Mame_SaferpayHyva Mame_SaferpayHyvaCheckout
php bin/magento setup:upgrade
php bin/magento hyva:config:generate
Rebuild the active theme's Tailwind CSS, then run DI compilation, static deployment and cache refresh. The Checkout compatibility package also requires the Theme compatibility package. Enable Hyvä Checkout for the intended Website or Store View through its normal configuration.
For a ZIP installation, place the Theme archive contents in app/code/Mame/SaferpayHyva/ and the Checkout archive contents in app/code/Mame/SaferpayHyvaCheckout/. Provide the licensed Hyvä dependencies separately. Only enable a compatibility module once the required Hyvä components are present.
Check the compatibility table and test all enabled payment options and saved-method consent before production use.