PHPackages                             mitrm/yii2-gourlio - 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. mitrm/yii2-gourlio

ActiveYii2-extension[Payment Processing](/categories/payments)

mitrm/yii2-gourlio
==================

gourl.io payment extension.

1.000(8y ago)02.2kAGPL-3.0-or-laterPHPPHP &gt;=5.4.0

Since Apr 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mitrm/yii2-gourlio)[ Packagist](https://packagist.org/packages/mitrm/yii2-gourlio)[ Docs](https://github.com/mitrm/yii2-gourlio)[ RSS](/packages/mitrm-yii2-gourlio/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

gourl.io
========

[](#gourlio)

Прием платежей в биткоинах и альткойнах

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

[](#installation)

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

Either run

```
composer require --prefer-dist mitrm/yii2-gourlio "*"

```

or add

```
"mitrm/yii2-gourlio": "*"

```

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

Usage
-----

[](#usage)

В config/main.php добавить

```
'components' => [
    'gourlio' => [
        'class' => 'mitrm\gourlio\Cryptobox',
        'period' => 'NOEXPIRY',
        'all_key' => [
            'bitcoin' => ['public_key' => '', 'private_key' => ''],
            'speedcoin' => ['public_key' => '', 'private_key' => ''],
            ...
        ]
    ],
]
```

Формирование данных для оплаты

```
$options = array(
    'order_id' => $order_id,
    'user_id' => Yii::$app->user->id,
    'amount' => $sum,
    'coinName' => 'speedcoin', // bitcoin ...
);
$data_pay = Yii::$app->gourlio->load($options)->getPaymentData();

$data_pay['addr']; // Номер кошелька для перевода средств
$data_pay['amount']; // сумма к оплате
```

Проверка оплаты

```
$options = array(
    'order_id' => $order_id,
    'user_id' => Yii::$app->user->id,
    'amount' => $sum,
    'coinName' => 'speedcoin', // bitcoin ...
);
if(Yii::$app->gourlio->load($options)->isPaid())  {
    // Оплата пришла
}
```

Получение оповещений по оплате от gourl.io

```
class PaymentsController extends Controller
{
    public $enableCsrfValidation = false;

    /**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'result' => [
                'class' => '\mitrm\gourlio\ResultAction',
                'callback' => [$this, 'resultCallbackGourlio'],
            ]
        ];
    }

    /**
     * Обработка оповещения о платеже с gourl.io
     * @param $cryptobox Cryptobox
     * @param $return_data
     * @return string
     */
    public function resultCallbackGourlio($cryptobox, $return_data)
    {
        $model = PaymentRequest::findOne(['id' => $return_data['params']['order'], 'user_id' => $return_data['params']['user']]);
        if (!$model) {
            throw new BadRequestHttpException('Транзакция не найдена');
        }
        $data = [
            'order_id' => $model->id,
            'user_id' => Yii::$app->user->id,
            'amount' => $model->sum,
            'coinName' => $model->currency, // speedcoin, bitcoin, ...
        ];
        $cryptobox->load($data);
        if($cryptobox->isPaid()) {
            $model->sum = $return_data['params']['amount'];
            $model->status_id = PaymentRequest::STATUS_SUCCESS;
            $model->save();
        }
        return $return_data['text_return'];
    }

}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

2962d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b8ac7c311b77a2512bd5a04d2c9bcf67f542c853e922f2d43ea3306b5691a4b?d=identicon)[mitrm](/maintainers/mitrm)

---

Tags

yii2extensionyiibitcoinyii 2altcoingourl.io

### Embed Badge

![Health badge](/badges/mitrm-yii2-gourlio/health.svg)

```
[![Health](https://phpackages.com/badges/mitrm-yii2-gourlio/health.svg)](https://phpackages.com/packages/mitrm-yii2-gourlio)
```

PHPackages © 2026

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