PHPackages                             echopay/module-payment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. echopay/module-payment

ActiveMagento2-module[Payment Processing](/categories/payments)

echopay/module-payment
======================

EchoPay Payment Module - Direct bank transfer payment gateway integration for Magento 2

1.0.1(3mo ago)14proprietaryPHPPHP &gt;=7.4

Since Mar 10Pushed 3mo agoCompare

[ Source](https://github.com/EchoPayTechnology/echopay-payment)[ Packagist](https://packagist.org/packages/echopay/module-payment)[ Docs](https://www.echopay.com)[ RSS](/packages/echopay-module-payment/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

EchoPay Payment Module for Magento 2
====================================

[](#echopay-payment-module-for-magento-2)

[Packagist](https://packagist.org/packages/echopay/module-payment)

Direct bank transfer payment gateway integration for Magento 2.

- **Module Name**: Echopay\_Payment
- **Type**: magento2-module
- **Version**: 1.0.1
- **Package**: echopay/module-payment

Features
--------

[](#features)

- Easy-to-integrate bank transfer payment method
- Secure webhook processing for payment confirmations
- Configurable payment options in admin
- Real-time payment status tracking
- Multi-currency support
- Admin panel with jQuery compatibility fixes

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

[](#requirements)

- Magento 2.3+ (tested on 2.4.x)
- PHP 7.4+
- Composer
- cURL extension

Installation via Composer
-------------------------

[](#installation-via-composer)

```
composer require echopay/module-payment:^1.0
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento cache:flush
```

Installation Manual (Docker)
----------------------------

[](#installation-manual-docker)

If you're using the included Docker setup:

```
docker-compose up -d
bash ./bash/cli.sh
# Select option 1: Start Environment
```

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

[](#configuration)

1. Log into Magento Admin
2. Navigate to **Stores** → **Configuration** → **Sales** → **Payment Methods**
3. Locate **EchoPay** section
4. Configure:
    - **Enabled**: Enable/disable payment method
    - **Title**: Display name on checkout
    - **API Key**: Your EchoPay API credentials
    - **API Secret**: Your EchoPay secret key
    - **Environment**: Live or Testing mode

Enable/Disable Management
-------------------------

[](#enabledisable-management)

### Enable Module

[](#enable-module)

```
php bin/magento module:enable Echopay_Payment
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

### Disable Module

[](#disable-module)

```
php bin/magento module:disable Echopay_Payment
php bin/magento setup:upgrade
```

### Check Module Status

[](#check-module-status)

```
php bin/magento module:status | grep Echopay
```

Uninstall/Remove
----------------

[](#uninstallremove)

### Via Composer

[](#via-composer)

```
composer remove echopay/module-payment
php bin/magento setup:upgrade
```

### Manual Removal

[](#manual-removal)

```
rm -rf app/code/Echopay/Payment
php bin/magento setup:upgrade
php bin/magento cache:flush
```

Module Structure
----------------

[](#module-structure)

```
Echopay/Payment/
├── Block/              # Admin and frontend blocks
├── Controller/         # Request handlers
├── Model/              # Business logic and data models
├── Observer/           # Event observers
├── etc/                # Configuration
│   ├── module.xml      # Module declaration
│   ├── config.xml      # System configuration
│   ├── adminhtml/      # Admin configuration
│   └── frontend/       # Frontend configuration
├── view/               # Templates and layouts
│   ├── frontend/       # Checkout and customer pages
│   └── adminhtml/      # Admin pages and configurations
├── Api/                # API interfaces (if applicable)
├── composer.json       # Package metadata
├── registration.php    # Module registration
└── README.md           # This file

```

Troubleshooting
---------------

[](#troubleshooting)

### Admin Panel Issues

[](#admin-panel-issues)

**Problem**: Accordion sections not opening in admin

- **Solution**: Clear cache `php bin/magento cache:flush`
- The module includes jQuery/Prototype.js compatibility fixes automatically

**Problem**: Configuration form won't save

- **Solution**: Check browser console for errors, clear `var/cache`

### Payment Method Not Showing

[](#payment-method-not-showing)

**Problem**: Payment method doesn't appear at checkout

- **Verify**: Module is enabled (`php bin/magento module:status`)
- **Check**: Payment method is configured in admin
- **Clear**: Browser cache (Cmd/Ctrl+Shift+R)

### Database Issues After Update

[](#database-issues-after-update)

```
php bin/magento setup:upgrade --keep-generated
php bin/magento cache:clean
```

Versioning
----------

[](#versioning)

This module follows [Semantic Versioning](https://semver.org):

- **MAJOR**: Incompatible changes
- **MINOR**: Backward-compatible features
- **PATCH**: Bug fixes

Distribution Channels
---------------------

[](#distribution-channels)

### Magento Marketplace

[](#magento-marketplace)

To publish on Magento Marketplace:

1. Create Magento Marketplace account
2. Register module with correct package structure
3. Provide Security Scan Tool clearance
4. Submit for approval

### Direct Distribution

[](#direct-distribution)

For direct delivery:

1. Package: `tar czf echopay-module-payment-1.0.0.tar.gz app/code/Echopay/`
2. Document: Installation steps and dependencies
3. Support: Provide contact and documentation links

### Packagist (Composer)

[](#packagist-composer)

To publish on Packagist:

1. Push code to GitHub
2. Register repo at packagist.org
3. Tag releases with version numbers
4. Composer will auto-detect new versions

CI/CD Pipeline
--------------

[](#cicd-pipeline)

For automated testing and releases:

```
# Example GitHub Actions
- Test on Magento 2.3, 2.4, 2.4.1
- PHP CodeSniffer for code standards
- Unit tests
- Integration tests
- Auto-tag and release on merge
```

Support
-------

[](#support)

- **Email**:
- **Documentation**:
- **GitHub Issues**:

License
-------

[](#license)

Proprietary - All rights reserved. See LICENSE file.

Changelog
---------

[](#changelog)

### 1.0.0 (2026-02-07)

[](#100-2026-02-07)

- ✨ Initial release
- ✨ Core payment integration
- ✨ Admin configuration interface
- ✨ Webhook processing
- 🐛 jQuery compatibility fixes for legacy admin

---

**Last Updated**: 2026-02-07
**Maintained By**: EchoPay Team The EchoPay Payment module provides:

- ✅ **Payment Link Integration** - Seamless EchoPay open banking payment processing
- ✅ **Checkout Integration** - "Pay Now" button with double-click protection
- ✅ **Order Creation** - Automatic order creation on successful payment
- ✅ **Cart Management** - Cart cleared after successful payment
- ✅ **Payment Status Handling** - Support for SUCCESS, PROCESSING, INITIATED, FAILED, and PENDING statuses
- ✅ **Callback Processing** - Handles payment callbacks with automatic order updates
- ✅ **Admin Configuration** - Easy setup via Magento admin panel
- ✅ **Multiple Environments** - Support for development and production modes

Payment Flow
------------

[](#payment-flow)

1. Customer adds items to cart and proceeds to checkout
2. Selects EchoPay as payment method
3. Clicks "Pay Now" button (button disables to prevent double-clicks)
4. Payment link created via EchoPay API
5. Customer redirected to EchoPay payment page
6. Completes payment with their bank
7. Returns to store with payment status
8. Order is created automatically on success
9. Cart is cleared
10. Customer sees success message with order confirmation

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

[](#configuration-1)

Payment method settings can be configured in the Magento Admin:

**Location**: Stores &gt; Settings &gt; Configuration &gt; Sales &gt; Payment Methods &gt; EchoPay

Required settings:

- **Enable EchoPay**: Enable/disable the payment method
- **Environment**: Select `dev` for testing or `prod` for production
- **API Key**: Your EchoPay API key (from EchoPay dashboard)
- **Webhook Secret**: Your webhook signing secret for callback verification
- **Custom Callback URL**: Set in EchoPay dashboard to `http://your-domain.com/echopay/payment/callback`

### API Endpoints

[](#api-endpoints)

- **Create Payment Link**: POST `/echopay/payment/create`

    - Creates a payment link for the current quote
    - Returns: `{ success: boolean, paymentLink: { id, url, date } }`
- **Payment Callback**: GET `/echopay/payment/callback?status={status}&id={link_id}&info={info}`

    - Receives payment status from EchoPay
    - Creates order on success
    - Redirects to appropriate page

API Configuration
-----------------

[](#api-configuration)

1. **Get your API Key**:

    - Login to EchoPay dashboard
    - Go to Settings → API
    - Create a new API key and copy it
2. **Set Webhook Secret**:

    - In EchoPay dashboard → Settings → Notifications
    - Copy your webhook secret
3. **Configure Callback URL**:

    - In EchoPay dashboard → Settings → API
    - Set Custom Callback to: `http://your-store.com/echopay/payment/callback`

Development
-----------

[](#development)

### Module Structure Details

[](#module-structure-details)

```
Echopay/Payment/
├── Model/
│   ├── Payment/
│   │   └── Echopay.php              # Payment method model
│   └── PaymentMethod.php            # Payment method configuration
├── Controller/
│   └── Payment/
│       ├── Create.php               # AJAX endpoint for payment link creation
│       └── Callback.php             # Payment callback handler
├── Service/
│   └── EchopayApiService.php        # EchoPay API service (token, links, verification)
├── view/frontend/
│   ├── js/
│   │   └── view/payment/method-renderer/
│   │       └── echopay-method.js   # Frontend payment handler with button state
│   └── templates/payment/
│       └── echopay.html            # Payment method template
└── etc/
    ├── module.xml
    ├── di.xml
    ├── config.xml
    ├── frontend/routes.xml
    └── adminhtml/system.xml

```

### Key Components

[](#key-components)

**EchopayApiService**

- Handles OAuth token generation with 1-hour expiry and 5-minute buffer
- Creates and retrieves payment links
- Verifies webhook signatures using HMAC SHA256
- Manages API authentication and error handling

**Payment Method (Echopay.php)**

- Extends `Magento\Payment\Model\Method\AbstractMethod`
- Integrates with Magento payment gateway
- Handles payment capture flow
- Configured to support partial captures but no refunds/voids

**Create Controller**

- Receives "Pay Now" button clicks via AJAX
- Extracts cart and customer data
- Creates payment link via EchoPay API
- Returns link ID and redirect URL for frontend

**Callback Controller**

- Handles redirects from EchoPay after payment completion
- Fetches payment status from EchoPay API
- Creates order automatically on SUCCESS or INITIATED status
- Deactivates quote and clears cart
- Manages customer session and redirects to appropriate page

**Frontend Renderer** (echopay-method.js)

- Handles "Pay Now" button interactions
- Disables button and shows "Processing..." during payment
- Sends AJAX request to create payment link
- Redirects to EchoPay payment page
- Handles errors with appropriate messaging and button re-enable

### Installation &amp; Setup

[](#installation--setup)

1. **Enable the module**:

    ```
    docker exec magento2-web php bin/magento module:enable Echopay_Payment
    docker exec magento2-web php bin/magento setup:upgrade
    ```
2. **Run compilation**:

    ```
    docker exec magento2-web php bin/magento setup:di:compile
    docker exec magento2-web php bin/magento setup:static-content:deploy -f
    ```
3. **Configure in Admin**:

    - Navigate to Stores → Configuration → Sales → Payment Methods
    - Find "EchoPay" section
    - Enable the method
    - Enter your API Key and select environment
    - Add your webhook secret
    - Enter your callback URL

### Payment Statuses

[](#payment-statuses)

The module handles the following payment statuses from EchoPay:

- **SUCCESS**: Payment completed successfully → Order created, customer redirected to success page
- **INITIATED**: Payment link created → Order created, customer redirected to success page
- **PROCESSING**: Payment is being processed → Message shown, customer can view cart
- **FAILED**: Payment failed → Quote restored, customer can retry
- **PENDING**: Payment pending → Quote restored, customer can retry

### Testing

[](#testing)

#### Development Environment

[](#development-environment)

- Use EchoPay development API: `https://dev.cloud.echopay.co.uk/v2`
- Use test API Key: `Zd77rh7uLg5lvMKdn1yj`
- Use mock bank account login during payment

#### Testing Payment Flow

[](#testing-payment-flow)

1. Add products to cart
2. Proceed to checkout
3. Select "EchoPay" as payment method
4. Click "Pay Now"
5. Verify button disables and shows "Processing..."
6. Complete payment with mock bank
7. Verify redirect to success page
8. Check that order was created in Magento
9. Verify cart is empty

### Troubleshooting

[](#troubleshooting-1)

**Payment link creation fails**

- Check API Key in admin configuration
- Verify environment is set correctly (dev vs prod)
- Check quote has items and customer data
- Review error logs in `var/log/system.log`

**Callback not being called**

- Verify callback URL in EchoPay dashboard matches your store
- Check firewall isn't blocking EchoPay servers
- Review Magento logs for any errors
- Verify webhook secret is configured

**Order not created after payment**

- Check DI compilation: `docker exec magento2-web php bin/magento setup:di:compile`
- Verify cache is cleared: `docker exec magento2-web php bin/magento cache:clean`
- Review order creation permissions
- Check database for quote changes

**Button stays disabled**

- Check browser console for JavaScript errors
- Verify static content deployed: `docker exec magento2-web php bin/magento setup:static-content:deploy -f`
- Check CSRF token is valid
- Clear browser cache

### Docker Commands (Development)

[](#docker-commands-development)

If running in Docker:

```
# Recompile DI
docker exec magento2-web php bin/magento setup:di:compile

# Deploy static content
docker exec magento2-web php bin/magento setup:static-content:deploy -f

# Clear cache
docker exec magento2-web php bin/magento cache:clean

# Disable module
docker exec magento2-web php bin/magento module:disable Echopay_Payment
docker exec magento2-web php bin/magento setup:upgrade

# Check logs
docker exec magento2-web tail -f var/log/system.log
```

### API Reference

[](#api-reference)

**EchoPay API Base URLs**

- Development: `https://dev.cloud.echopay.co.uk/v2`
- Production: `https://api.echopay.co.uk/v2`

**Create Payment Link**

```
POST {base_url}/payment-links
Authorization: Bearer {token}
Content-Type: application/json

{
  "amount": 1000,
  "currency": "GBP",
  "description": "Order #100001",
  "redirectUrl": "https://store.com/echopay/payment/callback"
}

```

**Get Payment Link Status**

```
GET {base_url}/payment-links/{link_id}
Authorization: Bearer {token}

```

**Get Token**

```
POST {base_url}/token
Authorization: Basic base64(api_key:)

```

Module Dependencies
-------------------

[](#module-dependencies)

- **PHP**: &gt;= 8.0
- **Magento**: 2.x
- **composer** package: echopay/module-payment

Support
-------

[](#support-1)

For issues or questions about this module, please contact the EchoPay development team.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance78

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

116d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25808747?v=4)[goldlabel](/maintainers/goldlabel)[@GoldLabel](https://github.com/GoldLabel)

---

Top Contributors

[![goldlabelapps](https://avatars.githubusercontent.com/u/244006120?v=4)](https://github.com/goldlabelapps "goldlabelapps (3 commits)")

---

Tags

magentomagento2-modulepaymentdirect debitmagento2bank transfer

### Embed Badge

![Health badge](/badges/echopay-module-payment/health.svg)

```
[![Health](https://phpackages.com/badges/echopay-module-payment/health.svg)](https://phpackages.com/packages/echopay-module-payment)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[amzn/amazon-pay-magento-2-module

Official Magento2 Plugin to integrate with Amazon Pay

108531.2k1](/packages/amzn-amazon-pay-magento-2-module)[vipps/module-payment

Vipps MobilePay Payment Module for Magento 2

1098.4k](/packages/vipps-module-payment)[pagbank/payment-magento

PagBank - Payment for Magento and Adobe

2131.2k7](/packages/pagbank-payment-magento)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
