PHPackages                             tobelyan/omnipay-arca-epg - 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. tobelyan/omnipay-arca-epg

ActiveLibrary[Payment Processing](/categories/payments)

tobelyan/omnipay-arca-epg
=========================

ARCA EPG (Electronic Payment Gateway) driver for Omnipay. Supports ACBA, ASHIB, INECO and other arca.am partner banks with card binding support.

012

Since May 16Compare

[ Source](https://github.com/tobelyan/omnipay-arca-epg)[ Packagist](https://packagist.org/packages/tobelyan/omnipay-arca-epg)[ RSS](/packages/tobelyan-omnipay-arca-epg/feed)WikiDiscussions Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Omnipay: ARCA EPG
=================

[](#omnipay-arca-epg)

**ARCA EPG (Electronic Payment Gateway) driver for the Omnipay payment processing library.**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP. This package implements ARCA EPG support for Omnipay, enabling integration with Armenian banks including ACBA, ASHIB, INECO, and all other arca.am partner banks. Supports card binding (tokenization) for recurring payments.

Supported Banks
---------------

[](#supported-banks)

All banks connected to the ARCA EPG network, including:

- ACBA Bank
- ASHIB Bank (Ardshinbank)
- INECO Bank
- Converse Bank
- and other arca.am partners

Installation
------------

[](#installation)

Install via [Composer](https://getcomposer.org/):

```
composer require tobelyan/omnipay-arca-epg
```

Or add to your `composer.json`:

```
{
    "require": {
        "tobelyan/omnipay-arca-epg": "^1.0"
    }
}
```

Endpoints
---------

[](#endpoints)

EnvironmentURLProduction`https://epg.arca.am/payment/rest/`Test`https://testepg.arca.am/payment/rest/`Basic Usage
-----------

[](#basic-usage)

### 1. Initialize the Gateway

[](#1-initialize-the-gateway)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('ArcaEpg');
$gateway->setUserName(env('ARCA_USERNAME'));
$gateway->setPassword(env('ARCA_PASSWORD'));
$gateway->setTestMode(true); // set false for production
```

### 2. Register an Order (Purchase)

[](#2-register-an-order-purchase)

```
$response = $gateway->purchase([
    'transactionId' => 'YOUR_ORDER_NUMBER',  // unique order number in your system
    'amount'        => '10.00',              // amount in AMD (e.g. 10.00 = 1000 minor units)
    'currency'      => '051',                // AMD = 051, USD = 840
    'returnUrl'     => 'https://yoursite.am/payment/callback',
    'description'   => 'Order #123',
    'language'      => 'hy',                 // hy / ru / en
])->send();

if ($response->isRedirect()) {
    $response->redirect(); // redirects customer to ARCA payment page
}

// Store $response->getTransactionReference() (orderId from ARCA) for later status checks
$arcaOrderId = $response->getTransactionReference();
```

### 3. Check Order Status After Callback

[](#3-check-order-status-after-callback)

When the customer returns from the payment page, ARCA appends `?orderId=...` to your `returnUrl`. Use that to check the result:

```
public function callback(Request $request)
{
    $gateway = Omnipay::create('ArcaEpg');
    $gateway->setUserName(env('ARCA_USERNAME'));
    $gateway->setPassword(env('ARCA_PASSWORD'));
    $gateway->setTestMode(true);

    $response = $gateway->getOrderStatusExtended([
        'transactionId' => $request->orderId,
        'language'      => 'hy',
    ])->send();

    if ($response->isSuccessful()) {
        // Payment completed — fulfill the order
    } else {
        // Payment failed or pending
        $error = $response->getMessage();
    }
}
```

All Available Methods
---------------------

[](#all-available-methods)

### `purchase(array $params)` — Register order

[](#purchasearray-params--register-order)

ParameterRequiredDescription`transactionId`yesYour unique order number`amount`yesAmount (e.g. `10.00`)`returnUrl`yesURL to redirect after payment`currency`noISO 4217 numeric code (default: AMD = 051)`description`noOrder description`language`no`hy`, `ru`, or `en``pageView`no`DESKTOP` or `MOBILE``clientId`noYour client ID (required for card binding)`jsonParams`noJSON string with additional parameters`sessionTimeoutSecs`noSession timeout in seconds### `registerPreAuth(array $params)` — Two-phase payment (pre-authorization)

[](#registerpreautharray-params--two-phase-payment-pre-authorization)

Same parameters as `purchase()`. The amount is only reserved, not charged. Use `deposit()` to confirm.

### `deposit(array $params)` — Confirm pre-authorized order

[](#depositarray-params--confirm-pre-authorized-order)

ParameterRequiredDescription`transactionId`yesARCA `orderId` returned from `registerPreAuth``amount`yesAmount to charge (must not exceed pre-auth amount)### `reverse(array $params)` — Cancel / reverse an order

[](#reversearray-params--cancel--reverse-an-order)

ParameterRequiredDescription`transactionId`yesARCA `orderId`### `refund(array $params)` — Refund a completed payment

[](#refundarray-params--refund-a-completed-payment)

ParameterRequiredDescription`transactionId`yesARCA `orderId``amount`yesAmount to refund### `getOrderStatus(array $params)` — Basic order status

[](#getorderstatusarray-params--basic-order-status)

ParameterRequiredDescription`transactionId`yesARCA `orderId``language`no`hy`, `ru`, or `en`### `getOrderStatusExtended(array $params)` — Full order status with card details

[](#getorderstatusextendedarray-params--full-order-status-with-card-details)

Same parameters as `getOrderStatus()`. Returns additional fields like `cardAuthInfo` and `bindingInfo`.

### `verifyEnrollment(array $params)` — Check 3DS enrollment

[](#verifyenrollmentarray-params--check-3ds-enrollment)

ParameterRequiredDescription`pan`yesCard number (PAN)---

Card Binding (Tokenization)
---------------------------

[](#card-binding-tokenization)

Card binding lets you save a card reference (token) for future payments without re-entering card details.

### Step 1 — Register order with binding enabled

[](#step-1--register-order-with-binding-enabled)

```
$response = $gateway->purchase([
    'transactionId' => 'ORDER_001',
    'amount'        => '10.00',
    'returnUrl'     => 'https://yoursite.am/payment/callback',
    'clientId'      => (string) auth()->id(),  // required to associate the binding
])->send();

if ($response->isRedirect()) {
    $response->redirect();
}
```

### Step 2 — Retrieve binding info after payment

[](#step-2--retrieve-binding-info-after-payment)

```
$response = $gateway->getOrderStatusExtended([
    'transactionId' => $arcaOrderId,
])->send();

if ($response->isSuccessful()) {
    $data = $response->getData();

    // Save these to your database
    $bindingId      = $data['bindingInfo']['bindingId'];
    $clientId       = $data['bindingInfo']['clientId'];
    $pan            = $data['cardAuthInfo']['pan'];            // masked card number
    $expiration     = $data['cardAuthInfo']['expiration'];
    $cardholderName = $data['cardAuthInfo']['cardholderName'];
}
```

### Step 3 — Pay with a saved binding

[](#step-3--pay-with-a-saved-binding)

```
$response = $gateway->makeBindingPayment([
    'transactionId' => 'ORDER_002',
    'amount'        => '25.00',
    'bindingId'     => $savedBindingId,
    'currency'      => '051',
    'language'      => 'hy',
])->send();

if ($response->isSuccessful()) {
    // Silent payment completed
} elseif ($response->isRedirect()) {
    // 3DS required — redirect customer
    $response->redirect();
}
```

### `makeBindingPayment(array $params)` — Pay with saved card

[](#makebindingpaymentarray-params--pay-with-saved-card)

ParameterRequiredDescription`transactionId`yesYour unique order number`amount`yesAmount to charge`bindingId`yesSaved binding ID`currency`noISO 4217 numeric code`clientId`noClient ID`language`no`hy`, `ru`, or `en``description`noOrder description`jsonParams`noAdditional parameters as JSON`mdOrder`noARCA order ID (if pre-registered)### `activateCardBinding(array $params)` — Activate a binding

[](#activatecardbindingarray-params--activate-a-binding)

ParameterRequiredDescription`bindingId`yesBinding ID to activate### `unBindCard(array $params)` — Deactivate a binding

[](#unbindcardarray-params--deactivate-a-binding)

ParameterRequiredDescription`bindingId`yesBinding ID to deactivate`language`no`hy`, `ru`, or `en````
$response = $gateway->unBindCard([
    'bindingId' => $savedBindingId,
])->send();
```

### `getBindings(array $params)` — List all bindings for a client

[](#getbindingsarray-params--list-all-bindings-for-a-client)

ParameterRequiredDescription`clientId`yesClient ID whose bindings to retrieve`language`no`hy`, `ru`, or `en````
$response = $gateway->getBindings([
    'clientId' => (string) auth()->id(),
])->send();

if ($response->isSuccessful()) {
    $bindings = $response->getData()['bindings'];
}
```

---

Response Methods
----------------

[](#response-methods)

All responses share these methods:

MethodReturnsDescription`isSuccessful()``bool`Payment completed with no error`isRedirect()``bool`Response contains a redirect URL`getRedirectUrl()``string`URL to redirect the customer to`getTransactionReference()``string`ARCA `orderId``getOrderStatus()``int|null`Order status code (2 = deposited)`getCode()``string`Error code (0 = no error)`getMessage()``string`Error message`getOrderNumberReference()``string`Your original order number`getActionCodeDescription()``string`Human-readable action description`getData()``array`Full raw response array### Order Status Codes

[](#order-status-codes)

CodeMeaning0Order registered, not paid1Pre-authorized amount reserved2Order fully authorized (deposited)3Authorization cancelled4Refund performed5Access Control Server initiated authorization6Authorization rejected---

Test Mode
---------

[](#test-mode)

Enable test mode to use the test environment (`https://testepg.arca.am/payment/rest/`):

```
$gateway->setTestMode(true);
```

---

Support
-------

[](#support)

For general Omnipay questions, post on [Stack Overflow](https://stackoverflow.com/) with the [`omnipay`](https://stackoverflow.com/questions/tagged/omnipay) tag.

Report bugs or request features via the [GitHub issue tracker](https://github.com/tobelyan/omnipay-arca-epg/issues).

Developed by
------------

[](#developed-by)

[![turn.am](https://camo.githubusercontent.com/da4475808c432060705af1d7a6664973d6035e6052598dcbadd83981e1a58f3b/68747470733a2f2f7475726e2e616d2f75706c6f6164732f7374617469632f3230323630323135313033303135353432312e737667)](https://turn.am)

This package was developed and is maintained by [turn.am](https://turn.am).

License
-------

[](#license)

MIT © [Rafayel Tobelyan](https://github.com/tobelyan)

###  Health Score

11

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc76c9c13f7b15625bfd1225d4d3a116149b4bb1d711bb3d93c05850307e312c?d=identicon)[tobelyan](/maintainers/tobelyan)

### Embed Badge

![Health badge](/badges/tobelyan-omnipay-arca-epg/health.svg)

```
[![Health](https://phpackages.com/badges/tobelyan-omnipay-arca-epg/health.svg)](https://phpackages.com/packages/tobelyan-omnipay-arca-epg)
```

###  Alternatives

[pagseguro/php

Biblioteca de integração com o PagSeguro

23260.3k6](/packages/pagseguro-php)[dinkbit/conekta-cashier

Dinkbit Cashier nos da una interface para cobrar subscripciones con Conketa en Laravel.

365.4k](/packages/dinkbit-conekta-cashier)[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.4k](/packages/msilabs-bkash)[binkode/laravel-paystack

A description for laravel-paystack.

112.1k](/packages/binkode-laravel-paystack)

PHPackages © 2026

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