PHPackages                             webtoucher/omnipay-payonline - 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. webtoucher/omnipay-payonline

ActiveLibrary[Payment Processing](/categories/payments)

webtoucher/omnipay-payonline
============================

PayOnline driver for the Omnipay payment processing library

0.1.3(9y ago)32.7kBSD-3-ClausePHPPHP &gt;=5.4.0

Since Oct 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/webtoucher/omnipay-payonline)[ Packagist](https://packagist.org/packages/webtoucher/omnipay-payonline)[ Docs](https://github.com/webtoucher/omnipay-payonline)[ RSS](/packages/webtoucher-omnipay-payonline/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

Omnipay: PayOnline
==================

[](#omnipay-payonline)

PayOnline payment processing driver for the Omnipay PHP payment processing library.

[![Latest Stable Version](https://camo.githubusercontent.com/fceba462e288658793160676a61a6a7e22a4a2ab93a5dc5e0158d2070d008689/68747470733a2f2f706f7365722e707567782e6f72672f776562746f75636865722f6f6d6e697061792d7061796f6e6c696e652f762f737461626c65)](https://packagist.org/packages/webtoucher/omnipay-payonline)[![Total Downloads](https://camo.githubusercontent.com/dbe98e5557e8097c6aeec5e5a506e70258ac29a22fcbe9c0b71d1413eb9e2f97/68747470733a2f2f706f7365722e707567782e6f72672f776562746f75636865722f6f6d6e697061792d7061796f6e6c696e652f646f776e6c6f616473)](https://packagist.org/packages/webtoucher/omnipay-payonline)[![Daily Downloads](https://camo.githubusercontent.com/dc48ffe2e25ada5956911506bbc234a199bbe7df0a4cc72de71a4939752a6b8a/68747470733a2f2f706f7365722e707567782e6f72672f776562746f75636865722f6f6d6e697061792d7061796f6e6c696e652f642f6461696c79)](https://packagist.org/packages/webtoucher/omnipay-payonline)[![Latest Unstable Version](https://camo.githubusercontent.com/6d4af929ff6f3473dfde6f3064760b9058a20cb70142119a99a858eb05c85282/68747470733a2f2f706f7365722e707567782e6f72672f776562746f75636865722f6f6d6e697061792d7061796f6e6c696e652f762f756e737461626c65)](https://packagist.org/packages/webtoucher/omnipay-payonline)[![License](https://camo.githubusercontent.com/dbc94b18f83c3c4e2499f6ff103f35415dbc9b379c85fbc4609befb5ddf3108f/68747470733a2f2f706f7365722e707567782e6f72672f776562746f75636865722f6f6d6e697061792d7061796f6e6c696e652f6c6963656e7365)](https://packagist.org/packages/webtoucher/omnipay-payonline)

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

[](#installation)

The preferred way to install this library is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require webtoucher/omnipay-payonline "*"

```

or add

```
"webtoucher/omnipay-payonline": "*"

```

to the `require` section of your `composer.json` file.

Configure your PayOnline MID
----------------------------

[](#configure-your-payonline-mid)

Ask PayOnline support for switching off ok/fail page if you need it. So you will be redirected to your return/fail URL immediately. Then check your MID settings:

- CallbackUrl method: POST
- Callback Url for approved transactions:
- Callback Url for declined transactions:
- Enable Callback on approved transactions: ON
- Enable Callback on declined transactions: ON

Usage
-----

[](#usage)

The following gateways are provided by this package:

- PayOnline

```
    $gateway = \Omnipay\Omnipay::create('PayOnline');
    $gateway->setMerchantId('[MERCHANT_ID]');
    $gateway->setApiKey('[API_PRIVATE_KEY]');
    $gateway->setLanguage('ru'); // default - en
```

Then you should create payment url (for redirecting or using iframe).

```
    try {
        $request = $this->gateway->purchase([
            'order_id' => 123,
            'amount' => 10,
            'currency' => 'EUR',
            'description' => 'Test payment',
            'user' => 1234,
            'email' => 'test@test.com',
            'return_url' => 'https://your.domain.com/your-callback/?result=1',
            'cancel_url' => 'https://your.domain.com/your-callback/?result=0',,
        ]);

        $response = $request->send();

        if ($response->isSuccessful()) {
            $url = $response->getUrl();
            // Use this url as iframe source or for redirect
        }
    } catch (\Omnipay\Common\Exception\OmnipayException $e) {
        // Your handler
    }
```

Create controller's action for catching PayOnline callbacks. Remember that you must use the same action for successful/unsuccessful callbacks (POST-requests) and as return/fail URL (GET-requests). Check type of request to know what should you do.

```
    if (/* is post request */) {
        try {
            $request = $this->gateway->completePurchase([
                'result' => $result,
                'datetime' => $DateTime,
                'transaction_id' => $TransactionID,
                'order_id' => $OrderId,
                'amount' => $Amount,
                'currency' => $Currency,
                'token' => $RebillAnchor,
                'card_number' => $CardNumber,
                'user' => $User,
                'error_code' => isset($Code) ? $Code : $ErrorCode,
            ]);

            $response = $request->send();

            $success = $response->isSuccessful();
        } catch (\Omnipay\Common\Exception\OmnipayException $e) {
            $success = false;
            // Your handler
        }
        // Your logic
    } else {
        // Your logic for return/fail URL
    }
```

Remember that PayOnline send rebill tokens for ssl-connection only. You can extract masked card number and token and save these into your system.

```
    $cardNumber = $request->getCardNumber();
    $token = $request->getToken();
    // Your logic
```

Use rebill request for recurring payments.

```
    try {
        $request = $this->gateway->rebill([
            'token' => $token,
            'order_id' => 124,
            'amount' => 10,
            'currency' => 'EUR',
        ]);

        $response = $request->send();

        $success = $response->isSuccessful();
    } catch (\Omnipay\Common\Exception\OmnipayException $e) {
        $success = false;
        // Your handler
    }
```

For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/omnipay)repository.

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/webtoucher/omnipay-payonline/issues).

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~34 days

Total

4

Last Release

3452d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/500243?v=4)[Алексей Кузнецов](/maintainers/webtoucher)[@webtoucher](https://github.com/webtoucher)

---

Top Contributors

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

---

Tags

paymentpaymentsgatewaypaymerchantomnipayvisamastercardpayonline

### Embed Badge

![Health badge](/badges/webtoucher-omnipay-payonline/health.svg)

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

PHPackages © 2026

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