# emerchantpay/magento2-emp-plugin

> emerchantpay Payment Gateway for Magento 2

`composer require emerchantpay/magento2-emp-plugin`

Canonical URL: https://packagento.com/emerchantpay/magento2-emp-plugin

## At a glance

- **Vendor**: emerchantpay (https://packagento.com/emerchantpay.md)
- **Latest version**: 1.4.4 — released 2025-09-30
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/emerchantpay/magento2-emp-plugin and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require emerchantpay/magento2-emp-plugin:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

emerchantpay Payment Gateway for Magento 2

## README

emerchantpay Gateway Module for Magento 2 CE, EE, ECE
=============================

[![Latest Stable Version](https://poser.pugx.org/emerchantpay/magento2-emp-plugin/v/stable)](https://packagist.org/packages/emerchantpay/magento2-emp-plugin)
[![Total Downloads](https://img.shields.io/packagist/dt/emerchantpay/magento2-emp-plugin.svg?style=flat)](https://packagist.org/packages/emerchantpay/magento2-emp-plugin)
[![Software License](https://img.shields.io/badge/license-GPL-green.svg?style=flat)](http://opensource.org/licenses/gpl-2.0.php)

This is a Payment Module for Magento 2, that gives you the ability to process payments through emerchantpay's Payment Gateway - Genesis.

Requirements
------------

* Magento 2 CE, EE, ECE or higher (Tested up to __2.4.8-p1__)
* [GenesisPHP v2.2.0](https://github.com/GenesisGateway/genesis_php/releases/tag/2.2.0) - (Integrated in Module)

Installation (composer)
---------------------
* Install __Composer__ - [Composer Download Instructions](https://getcomposer.org/doc/00-intro.md)

* Install __emerchantpay Payment Gateway__

    * Install Payment Module

        ```sh
        $ composer require emerchantpay/magento2-emp-plugin
        ```

    * Enable Payment Module 
        
        ```sh
        $ php bin/magento module:enable EMerchantPay_Genesis --clear-static-content
        ```

        ```sh
        $ php bin/magento setup:upgrade
        ```

    * Deploy Magento Static Content (__Execute If needed__)
        ```sh
        $ php bin/magento setup:static-content:deploy
        ```

Installation (manual)
---------------------

* Upload the contents of the folder (excluding ```README.md```) to a new folder ```<root>/app/code/EMerchantPay/Genesis/``` of your Magento 2 installation
* Install GenesisGateway Client Library
    
    ```sh
    $ composer require genesisgateway/genesis_php:2.2.0@stable
    ```

* Enable Payment Module 

    ```sh
    $ php bin/magento module:enable EMerchantPay_Genesis --clear-static-content
    ```

    ```sh
    $ php bin/magento setup:upgrade
    ```

* Deploy Magento Static Content (__Execute If needed__)
    ```sh
    $ php bin/magento setup:static-content:deploy
    ```

Configuration
---------------------

* Login inside the __Admin Panel__ and go to ```Stores``` -> ```Configuration``` -> ```Sales``` -> ```Payment Methods```
* If the Payment Module Panel ```emerchantpay``` is not visible in the list of available Payment Methods, 
  go to  ```System``` -> ```Cache Management``` and clear Magento Cache by clicking on ```Flush Magento Cache```
* Go back to ```Payment Methods``` and click the button ```Configure``` under the payment method ```emerchantpay Checkout``` to expand the available settings
* Set ```Enabled``` to ```Yes```, set the correct credentials, select your prefered transaction types and additional settings and click ```Save config```
* Set ```Enable e-mail notification``` to ```Yes``` to receive emails after successful payment.
  **Note**: If you consider sending Order e-mail after a successful payment, make sure to enable the configuration option from the payment method config and enable 
  the Order e-mails from the ```Stores``` -> ```Configuration``` -> ```Sales``` -> ```Sales Emails``` in the Order section.

GenesisPHP Requirements
------------

* PHP version 5.5.9 or newer
* PHP Extensions:
    * [BCMath](https://php.net/bcmath)
    * [CURL](https://php.net/curl) (required, only if you use the curl network interface)
    * [Filter](https://php.net/filter)
    * [Hash](https://php.net/hash)
    * [XMLReader](https://php.net/xmlreader)
    * [XMLWriter](https://php.net/xmlwriter)
    * [JSON](https://www.php.net/manual/en/book.json)
    * [OpenSSL](https://www.php.net/manual/en/book.openssl.php)

Supported Transactions
------------
* ```emerchantpay Checkout``` Payment Method
    * __Apple Pay__
    * __Argencard__
    * __Aura__
    * __Authorize__
    * __Authorize (3D-Secure)__
    * __Baloto__
    * __Bancomer__
    * __Bancontact__
    * __Banco de Occidente__
    * __BitPay__
    * __Boleto__
    * __Cabal__
    * __CashU__
    * __Cencosud__
    * __Davivienda__
    * __Efecty__
    * __Elo__
    * __eps__
    * __eZeeWallet__
    * __Fashioncheque__
    * __Google Pay__
    * __iDeal__
    * __iDebit__
    * __InstaDebit__
    * __Intersolve__
    * __Multibanco__
    * __MyBank__
    * __Naranja__
    * __Nativa__
    * __Neosurf__
    * __Neteller__
    * __Online Banking__
        * __Interac Combined Pay-in (CPI)__
        * __Bancontact (BCT)__
        * __BLIK (BLK)__
        * __SPEI (SE)__
        * __PayID (PID)__
    * __OXXO__
    * __P24__
    * __Pago Facil__
    * __PayPal__
    * __PaySafeCard__
    * __PayU__
    * __PIX__
    * __POLi__
    * __Post Finance__
    * __RapiPago__
    * __SafetyPay__
    * __Sale__
    * __Sale (3D-Secure)__
    * __Sepa Direct Debit__
    * __SOFORT__
    * __Tarjeta Shopping__
    * __TCS__
    * __Trustly__
    * __TrustPay__
    * __UPI__
    * __WebMoney__
    * __WeChat__

_Note_: If you have trouble with your credentials or terminal configuration, get in touch with our [support] team

You're now ready to process payments through our gateway.

[support]: mailto:tech-support@emerchantpay.net

Development
------------
*  Composer script to install Magento and emerchantpay Payment Gateway in Test/Dummy folder.

    ```sh
    $ composer install-magento
    ```
    If the Test/Dummy folder already exists the script will only update the emerchantpay Payment Gateway without installing Magento.   
    
    The credentials for `repo.magento.com` can be provided in an `auth.json` file inside the root of the project or by passing `repo_user` and `repo_name`.
  
    ```sh
    $ composer install-magento repo_user=XXX repo_pass=XXX
    ```

* Composer script to run PHPUnit tests

    ```sh
    $ composer test-phpunit
    ```

* Composer script to install Magento and run PHPUnit tests

_(README truncated for .md surface. Full README on https://packagento.com/emerchantpay/magento2-emp-plugin.)_

## Recent Versions

| Version | Released |
|---|---|
| 1.4.4 | 2025-09-30 |
| 1.4.3 | 2025-07-22 |
| 1.4.2 | 2025-07-02 |
| 1.4.1 | 2025-03-21 |
| 1.4.0 | 2024-11-01 |
| 1.3.11 | 2024-10-25 |
| 1.3.10 | 2024-08-13 |
| 1.3.9 | 2024-08-12 |
| 1.3.8 | 2024-07-22 |
| 1.3.7 | 2023-12-13 |

Showing 10 of 45 versions. Full release history on https://packagento.com/emerchantpay/magento2-emp-plugin.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| genesisgateway/genesis_php | 2.2.0 |
| php | 7.0.2\|7.0.4\|~7.0.6\|7.1.*\|7.2.*\|7.3.*\|7.4.*\|8.0.*\|8.1.*\|8.2.*\|8.3.*\|8.4.* |

### Require (dev)

| Package | Constraint |
|---|---|
| dealerdirect/phpcodesniffer-composer-installer | ^0.7.0 |
| fakerphp/faker | ^1.20 |
| magento/magento-coding-standard | * |
| phpmd/phpmd | ^2.9.1 |
| squizlabs/php_codesniffer | ~3.6.0 |

## Quality

Latest release (1.4.4) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | not tested |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 1 | 1 warning (ruleset: Magento2) — 1 auto-fixable with phpcbf |
| PHPMD | Warning | 5 | 5 rule violations (ExcessiveMethodLength:4, ExcessiveParameterList:1) |
| Cpd | Warning | 2 | 2 duplicated chunks spanning 95 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 3 | valid; 3 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 98 | 98 | – | – |
| 2.4.8 | – | 98 | 98 | – |
| 2.4.9 | – | – | 98 | N/A |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Error | Error | – | – |
| 2.4.8 | – | Error | not tested | – |
| 2.4.9 | – | – | Error | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["emerchantpay/magento2-emp-plugin"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

emerchantpay is a Magento 2 vendor on Packagento. See https://packagento.com/emerchantpay.md for their full catalogue.

