# Magento 2

{% hint style="info" %}
Available for Magento 2.4 - 2.4.x
{% endhint %}

## General Information

Magento 2 is an open-source e-commerce platform developed by Adobe for creating online shops. With a dedicated plugin, the Payrexx payment solution can be integrated into Magento 2.

The plugin is also compatible with the Magento Community Edition (Open Source).

### Links

* Magento 2 [Website](https://business.adobe.com/uk/products/magento/open-source.html)
* Plugin [Download](https://github.com/payrexx/magento-payrexx-gateway)

### Features

* ✅ Multi-currency support
* ✅ Payment method logos displayed at checkout
* ✅ Shopping cart data transfer
* ✅ Webhook Compatibility
* ✅ Custom configuration of payment methods
* ✅ [Hyvä Checkout Module](https://github.com/payrexx/hyva-payrexx-compatibility) Compatibility
* ❌ Look & Feel Customization Options
* ❌ Subscription Support

{% hint style="info" %}
Please note that integration with Magento 2 is only available in the Standard and Premium plans. [For more information](https://payrexx.com/en/prices)
{% endhint %}

### Payment methods

The following payment methods are supported by the Magento 2 plugin:

<table><thead><tr><th width="206.74072265625">Payrexx Pay</th><th width="244.1112060546875">Payrexx Pay Plus</th><th width="197.5555419921875">External Payment Providers</th><th data-hidden></th></tr></thead><tbody><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FU23TjmbpT2uSiA98Urvr%2Fimage.png?alt=media&#x26;token=698cb2dc-2958-4bae-ac0d-8f14fd23f25a" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/mastercard">Mastercard</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FU23TjmbpT2uSiA98Urvr%2Fimage.png?alt=media&#x26;token=698cb2dc-2958-4bae-ac0d-8f14fd23f25a" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/mastercard">Mastercard</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2F17PQY0D9XBWslkOAePIi%2Fimage.png?alt=media&#x26;token=f15fecf0-8c7a-4133-bbd1-c4f8b9f326e3" alt="" data-size="line"> Masterpass</td><td></td></tr><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FTExzR53XajpaGXyBwloF%2Fimage.png?alt=media&#x26;token=910ca6c0-3c57-4a66-aa82-aecca278a33c" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/visa">Visa</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FTExzR53XajpaGXyBwloF%2Fimage.png?alt=media&#x26;token=910ca6c0-3c57-4a66-aa82-aecca278a33c" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/visa">Visa</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FEbCDmeC8V30Jp7cfDMmL%2Fimage.png?alt=media&#x26;token=356dfeca-69b7-485b-ba90-40dfa368c642" alt="" data-size="line"> <a href="../../payment-provider/external-payment-provider/wallets-and-more/paypal">PayPal</a></td><td></td></tr><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FkoBQe0VPM9dFWRiqiZVs%2Fcard_postfinance-pay%402x.png?alt=media&#x26;token=94fcb934-b618-4e76-8881-7fdc961b03b9" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/postfinance-pay">PostFinance Pay</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FgvjappUZx21s50KJp4jJ%2Fimage.png?alt=media&#x26;token=15aa7958-2b06-4387-8e36-18f55879ef35" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/american-express">American Express</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FiXS2EAWFgZUKDMoPfTxC%2Fimage.png?alt=media&#x26;token=e61fd9d7-3579-4d54-b4a5-b53b3ce2ae09" alt="" data-size="line"> Maestro</td><td></td></tr><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FuQnNZ6B30ek4HB4NiAO6%2Fimage.png?alt=media&#x26;token=8d50396a-d987-4392-8c55-0ecff02976bf" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/twint">TWINT</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FBZc94MTsGISKMNY1yKQe%2Fimage.png?alt=media&#x26;token=3784cbc5-9f73-4480-9e0c-438247cc53b0" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/diners-club-international">Diners Club International</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FvP1GRJlnETPS7p5KFRAO%2FHeyLight_Payment_Badge_White.png?alt=media&#x26;token=81cac928-18b6-492b-a3d3-e881781f33f5" alt="" data-size="line"> HeyLight</td><td></td></tr><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FL96S2glvjyQYaO3ElGsi%2Fimage.png?alt=media&#x26;token=4480c84a-cec0-40c9-a862-64e750ed5a76" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/google-pay">Google Pay</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2Fh8W88W7CrPvrzaQywetK%2Fimage.png?alt=media&#x26;token=43218142-4c7e-4688-876c-07093b12b52c" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/discover-card">Discover Card</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FWQHRVQgGmdw802wCvl9D%2Fimage.png?alt=media&#x26;token=f93e95fc-9fc5-4639-8c18-4577268ea402" alt="" data-size="line"> Swissbilling</td><td></td></tr><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2F3JUbAMvaOppm7c9gGfgd%2Fimage.png?alt=media&#x26;token=646e064b-c936-4555-9730-e8c1324bdb63" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/pay-by-bank">Pay by Bank</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FsIjfxkfYxADQGSkEdfql%2Fimage.png?alt=media&#x26;token=7a559ecb-5990-4cb3-836b-aacdfa16b9e9" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/apple-pay">Apple Pay</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FZSohpmUv7PTvADtybLAw%2Fimage.png?alt=media&#x26;token=8d98e944-cde2-420d-a402-ffbc8dab69d9" alt="" data-size="line"> <a href="../../payment-provider/external-payment-provider/wallets-and-more/wirpay">WIRpay</a></td><td></td></tr><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FbwkGZ28bKoihwWZJ0rKW%2Fimage.png?alt=media&#x26;token=eb4af57b-6ad7-4428-a9d2-1dc72b9b87ca" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/purchase-on-invoice">Purchase on Invoice</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FL96S2glvjyQYaO3ElGsi%2Fimage.png?alt=media&#x26;token=4480c84a-cec0-40c9-a862-64e750ed5a76" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/google-pay">Google Pay</a></td><td> <img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FMZMtqLFfwlzj9Zaoulw6%2Fimage.png?alt=media&#x26;token=ee2793c3-66f2-446d-969e-52467cbe6a76" alt="" data-size="line"> <a href="../../payment-provider/external-payment-provider/wallets-and-more/viacash-barzahlen">Barzahlen/viacash</a></td><td></td></tr><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FtG7oej4GlXAVj5MRaDQA%2Fcard_centi.svg?alt=media&#x26;token=25ba20bd-f570-42b2-aca3-87c16c1df6a0" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/centi">Centi</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2F7ecpO7opevIFqeQ5E7d4%2Fimage.png?alt=media&#x26;token=8dfa9e55-d11f-41c9-9b65-03c052f5eabf" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/klarna">Klarna</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FvkmsRbygISp7pc6iXcmd%2Fimage.png?alt=media&#x26;token=0f7a14df-65b4-498f-ad07-b126fe99d58f" alt="" data-size="line"><a href="../../payment-provider/external-payment-provider/wallets-and-more/giropay">giropay</a></td><td></td></tr><tr><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2F3LT9LH8V4NSBBmWfgooX%2Fimage.png?alt=media&#x26;token=40d38d30-ad42-4266-8284-a2d6a25bb56c" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/crypto">Crypto</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FVrb3fwrd4QFuqNF4JHJV%2Fimage.png?alt=media&#x26;token=6e876ae4-55bb-4aa7-904a-5d64346aa544" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/eps">eps</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2Fjzn76C9v6tUnn1hQPdaN%2Fimage.png?alt=media&#x26;token=2c4f6971-3961-49b3-8641-278d99ef9589" alt="" data-size="line"> JCB</td><td></td></tr><tr><td></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FYYs9b7dPirpOajqJVKat%2Fimage.png?alt=media&#x26;token=ca5d5e5a-95a5-42fa-acbf-a3776a63d583" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/bancontact">Bancontact</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FZawt6ka43dMH2KuRleJk%2Fimage.png?alt=media&#x26;token=361d93ce-ad75-4865-8306-b6d089565cc7" alt="" data-size="line"> <a href="../../payment-provider/external-payment-provider/wallets-and-more/paysafecash">Paysafecash</a></td><td></td></tr><tr><td></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FIqAU0Q3JVT0JyEV07sHB%2Fimage.png?alt=media&#x26;token=6b8d23ed-e03a-4420-a02e-910324d7eb97" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/ideal">iDEAL</a></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2F8WH9kMh6Z07ADfe6CHBW%2Fimage.png?alt=media&#x26;token=ac95e696-743b-4059-bba1-f72966c9ea61" alt="" data-size="line"> Bitcoin</td><td></td></tr><tr><td></td><td> <img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FwymmgjastWo5KflOUzo1%2Fimage.png?alt=media&#x26;token=49f667ab-079f-4ebe-b86e-1722bcd5fc19" alt="" data-size="line"> <a href="../../payment-provider/payrexx-pay/payment-methods/sepa-debit-direct">SEPA Debit Direct</a></td><td> <img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FYYLrvgXBU7xPlfaWrbxj%2Fimage.png?alt=media&#x26;token=8a417150-7869-467d-974d-1e1d29c182a2" alt="" data-size="line"> <a href="../../payment-provider/external-payment-provider/manual-payment-methods/bill">Bill</a></td><td></td></tr><tr><td></td><td></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FbL6kUpIXTk8sTR4Ruoau%2Fimage.png?alt=media&#x26;token=8a90d4ef-8206-41c1-aa27-fa5fa303f165" alt="" data-size="line"> <a href="../../payment-provider/external-payment-provider/wallets-and-more/powerpay">POWERPAY</a></td><td></td></tr><tr><td></td><td></td><td><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FfrGPp9ikEtnbgH0WQWnV%2Fcembrapay.png?alt=media&#x26;token=4d4c9b24-ec21-4152-aff6-4b519b466099" alt="" data-size="line"> <a href="../../payment-provider/external-payment-provider/wallets-and-more/cembrapay">CembraPay</a></td><td></td></tr><tr><td></td><td></td><td> <img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2F4D7UFV9iKD1d35YFeIM8%2Fimage.png?alt=media&#x26;token=299bb3fc-55d2-470e-8a1a-d5009a14f906" alt="" data-size="line"> <a href="../../payment-provider/external-payment-provider/wallets-and-more/verd.cash">VERD</a></td><td></td></tr></tbody></table>

## Integration

Follow the instructions below to integrate Payrexx into Magento 2.

### Configuration of Payrexx

{% hint style="info" %}
Make sure you're [logged in](https://login.payrexx.com/) to your Payrexx account before you begin. If you don’t have a Payrexx account yet, you can [register](https://signup.payrexx.com/) now.
{% endhint %}

* In the merchant administration area of your Payrexx account, navigate to **API & Plugins**.
* Click "Show all" under "Add E-Commerce Integration".
* Next to Magento 2, click "Add".

<div align="left"><figure><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2Fr9quO07kBnPEponkMzqp%2Fimage.png?alt=media&#x26;token=a5427230-fb96-4bed-aecf-8320e31c3005" alt=""><figcaption><p>Start of Magento 2 integration</p></figcaption></figure></div>

* In the window that appears below, configure the following settings:

<div align="left"><figure><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2F2FVry6asbX3bq5qjs7Fa%2Fimage.png?alt=media&#x26;token=64b64ac3-3b87-4456-a662-c777391be88f" alt=""><figcaption></figcaption></figure></div>

1. **API Key:** Copy the displayed API key to your clipboard, as you will need it later.
2. **Instance name:** Copy the displayed instance name to your clipboard, as you will need it later.
3. **Enter shop address:** In this field, enter the URL of your shop. If your shop is not located in the root directory (e.g. <https://demo-shop.com>), but instead in a subdirectory, make sure to enter the full path to your shop.\
   Example: <https://demo-shop.com/shop>

{% hint style="warning" %}
Please ensure that the shop URL is entered correctly. Any discrepancies (e.g. using http\:// instead of https\://) may cause errors when processing webhooks.
{% endhint %}

4. **Webhooks**: Specify whether failed webhooks should be retried. If the checkbox is enabled, the system will attempt to resend the webhook up to 10 times.\
   Retry intervals are as follows: 5 minutes, 15 minutes, 1 hour, 2 hours, 4 hours, and then every 24 hours.
5. **Finalize:** Click the green "Activate" button to complete the configuration.

### Plugin installation

* Download the latest version of the [plugin](https://github.com/payrexx/magento-payrexx-gateway) from GitHub.
* Open the **/app/** directory located in the root directory of your Magento installation.
* Inside the **/app/** directory, create the following folder structure:\
  **code/Payrexx/PaymentGateway/**
* Extract the downloaded ZIP file into the **/PaymentGateway** directory.
* Move all extracted files and folders into the **/PaymentGateway** directory.

### Activating the extension

* Log in to the Magento 2 admin panel.
* Navigate to the root directory of your Magento 2 installation and execute the following commands:

`$ bin/magento setup:upgrade`

`$ bin/magento setup:di:compile`

`$ bin/magento cache:clean`

{% hint style="warning" %}
This process may take some time to complete.
{% endhint %}

{% hint style="info" %}
For Magento versions older than 2.3, the extension can alternatively be activated via\
**System > Web Setup Wizard**. Further details can be found in the installation guide on GitHub.
{% endhint %}

### Configuration of Magento 2

* In the Magento 2 admin panel, navigate to **Stores > Configuration > Sales > Payment Methods**.
* Scroll down to the section "Other Payment Methods" and click the expand triangle icon.
* Open the section "Required Settings" and enter the values that were previously copied to your clipboard during the [Payrexx configuration](#configuration-of-payrexx):

<div align="left"><figure><img src="https://1455115231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYJhU4qriZCz_Wxs0T0-887967055%2Fuploads%2FRJPOSU8fr3DMVxnA20rC%2Fimage.png?alt=media&#x26;token=da359ad4-3bb5-4139-ab90-b928d7e61574" alt=""><figcaption><p>Settings in Magento 2</p></figcaption></figure></div>

1. **Instance Name:** Enter the instance name provided by Payrexx.
2. **API Secret Key:** Enter the API key obtained from your Payrexx account.

{% hint style="info" %}
Alternatively, the connection can be established just as easily by clicking the "Connect" button.
{% endhint %}

{% hint style="success" %}
The configuration is complete. Your customers can now make payments in your Magento 2 shop using the payment methods provided by Payrexx.
{% endhint %}
