PHPackages                             aleksandrzhiliaev/omnipay-unitpay - 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. aleksandrzhiliaev/omnipay-unitpay

ActiveLibrary[Payment Processing](/categories/payments)

aleksandrzhiliaev/omnipay-unitpay
=================================

Unitpay gateway for Omnipay payment processing library

0.0.1(9y ago)1455PHP

Since Jul 1Pushed 8y agoCompare

[ Source](https://github.com/aleksandrzhiliaev/omnipay-unitpay)[ Packagist](https://packagist.org/packages/aleksandrzhiliaev/omnipay-unitpay)[ Docs](http://sassoft.ru)[ RSS](/packages/aleksandrzhiliaev-omnipay-unitpay/feed)WikiDiscussions master Synced 2d ago

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

omnipay-unitpay
===============

[](#omnipay-unitpay)

[![Build Status](https://camo.githubusercontent.com/93108286458d00bb7ae51207e1c970bcca010f788176f91bf4ad64074161ee67/68747470733a2f2f7472617669732d63692e6f72672f616c656b73616e64727a68696c696165762f6f6d6e697061792d756e69747061792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aleksandrzhiliaev/omnipay-unitpay)[![Latest Stable Version](https://camo.githubusercontent.com/a2a0abbfec47ccba2570fa318d252490d36b2142883b66960e3435ede5297f9f/68747470733a2f2f706f7365722e707567782e6f72672f616c656b73616e64727a68696c696165762f6f6d6e697061792d756e69747061792f762f737461626c65)](https://packagist.org/packages/aleksandrzhiliaev/omnipay-unitpay)[![Total Downloads](https://camo.githubusercontent.com/6276474460a949943644921bcf1551d3857cc0335e0fb9e335dec294a03ebaae/68747470733a2f2f706f7365722e707567782e6f72672f616c656b73616e64727a68696c696165762f6f6d6e697061792d756e69747061792f646f776e6c6f616473)](https://packagist.org/packages/aleksandrzhiliaev/omnipay-unitpay)

Unitpay gateway for [Omnipay](https://github.com/thephpleague/omnipay) payment processing library.

[Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements Okpay support for Omnipay.

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

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file:

```
{
    "require": {
        "aleksandrzhiliaev/omnipay-unitpay": "*"
    }
}
```

And run composer to update your dependencies:

```
$ curl -s http://getcomposer.org/installer | php
$ php composer.phar update

```

Basic Usage
-----------

[](#basic-usage)

The following gateways are provided by this package:

- Unitpay.ru

For general usage instructions, please see the main [Omnipay](https://github.com/omnipay/omnipay)repository. See also the [Unitpay Documentation](http://help.unitpay.ru)

Example
-------

[](#example)

1. Purchase:

```
$gateway = Omnipay::create('Unitpay');

$gateway->setPublicKey('');
$gateway->setSecretKey('');

$response = $gateway->purchase([
       'amount' => '0.1',
       'currency' => 'USD',
       'transactionId' => time(),
       'description' => 'Order # 123',
        ])->send();

if ($response->isSuccessful()) {
   // success
} elseif ($response->isRedirect()) {

   # Generate form to do payment
   $hiddenFields = '';
   foreach ($response->getRedirectData() as $key => $value) {
       $hiddenFields .= sprintf(
          '',
           htmlentities($key, ENT_QUOTES, 'UTF-8', false),
           htmlentities($value, ENT_QUOTES, 'UTF-8', false)
          )."\n";
   }

   $output = ' %2$s ';
   $output = sprintf(
      $output,
      htmlentities($response->getRedirectUrl(), ENT_QUOTES, 'UTF-8', false),
      $hiddenFields
   );
   echo $output;
   # End of generating form
} else {
   echo $response->getMessage();
}
```

2. Validate webhook

```
try {
    $response = $gateway->completePurchase()->send();
    $success = $response->isSuccessful();
    if ($success) {
       $transactionId = $response->getTransactionId();
       $amount = $response->getAmount();
       $currency = $response->getCurrency();
       // success
    }
} catch (\Exception $e) {
  // check $e->getMessage()
}
```

3. Do refund To be done

Support
-------

[](#support)

If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found.

If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to.

If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/aleksandrzhiliaev/omnipay-nixmoney/issues).

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

3287d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

omnipayphpunitpaypaymentgatewaypaymerchantomnipaypurchaseunitpay.ru

### Embed Badge

![Health badge](/badges/aleksandrzhiliaev-omnipay-unitpay/health.svg)

```
[![Health](https://phpackages.com/badges/aleksandrzhiliaev-omnipay-unitpay/health.svg)](https://phpackages.com/packages/aleksandrzhiliaev-omnipay-unitpay)
```

###  Alternatives

[lokielse/omnipay-alipay

Alipay gateway for Omnipay payment processing library

586422.8k11](/packages/lokielse-omnipay-alipay)

PHPackages © 2026

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