helloimdeadcat/magento2-xpay

XPAY payment gateway integration for Magento 2

Maintainers

Package info

github.com/helloimdeadcat/magento2-xpay

Type:magento2-module

pkg:composer/helloimdeadcat/magento2-xpay

Transparency log

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-07-11 13:10 UTC

This package is auto-updated.

Last update: 2026-07-11 13:13:04 UTC


README

Packagist Version Packagist Downloads License: MIT

Magento 2 payment module for XPAY. After placing an order, the customer is redirected to the XPAY payment widget. Payment confirmation is handled via a REST callback.

Requirements

  • PHP 8.1+
  • Magento 2.4.x
  • OpenSSL

Installation

Composer (recommended)

From your Magento 2 project root:

composer require helloimdeadcat/magento2-xpay:^1.0
bin/magento module:enable Stagem_Xpay
bin/magento setup:upgrade
bin/magento cache:flush

Note: The Magento module code namespace is Stagem\Xpay (Stagem_Xpay). The Composer package name is helloimdeadcat/magento2-xpay.

Composer (before Packagist registration)

If the package is not yet on Packagist, add the GitHub repository to your Magento root composer.json:

"repositories": {
    "magento2-xpay": {
        "type": "vcs",
        "url": "https://github.com/helloimdeadcat/magento2-xpay"
    }
}

Then run composer require helloimdeadcat/magento2-xpay:^1.0 as above.

Manual

  1. Copy the module to app/code/Stagem/Xpay
  2. Run:
bin/magento module:enable Stagem_Xpay
bin/magento setup:upgrade
bin/magento cache:flush

Configuration

Go to Stores → Configuration → Sales → Payment Methods → Xpay and configure:

Field Description
XPAY API URL API base URL (default: https://mapi.xpay.com.ua)
Xpay public key Partner public key provided by XPAY
Partner ID Partner ID provided by XPAY
User identified by Identify the customer by email or phone number
Return URL Success page path (default: xpay/payment/success)

How it works

  1. The customer selects XPAY at checkout and places the order.
  2. Magento redirects to xpay/payment/checkout?order={id}.
  3. The module builds the XPAY widget URL and redirects the customer.
  4. XPAY sends a callback to GET /rest/V1/xpay/process-pay.
  5. The module validates the signature, creates an invoice, and sends the invoice email.
  6. The customer is redirected back to the Magento success page.

Logging

Module events are written to var/log/xpay.log.

Changelog

See CHANGELOG.md.

License

MIT — see LICENSE.txt.