PHPackages                             sadykh/yii2-robokassa - 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. sadykh/yii2-robokassa

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

sadykh/yii2-robokassa
=====================

Robokassa payment extension.

1.1.3(9y ago)043BSD-3-ClausePHPPHP &gt;=5.4.0

Since Apr 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Sadykh/yii2-robokassa)[ Packagist](https://packagist.org/packages/sadykh/yii2-robokassa)[ RSS](/packages/sadykh-yii2-robokassa/feed)WikiDiscussions master Synced 2mo ago

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

yii2-robokassa
==============

[](#yii2-robokassa)

Install via Composer
--------------------

[](#install-via-composer)

```
composer require sadykh/yii2-robokassa

```

Configuration
-------------

[](#configuration)

```
'components' => [
    'robokassa' => [
        'class' => '\sadykh\robokassa',
        'baseUrl' => 'https://auth.robokassa.ru/Merchant/Index.aspx',
        'sMerchantLogin' => '',
        'sMerchantPass1' => '',
        'sMerchantPass2' => '',
        'isTest' => !YII_ENV_PROD,
    ]
    ...
]
```

Example
-------

[](#example)

```
class PaymentController extends Controller
{
    public function actionInvoice()
    {
        $model = new Invoice();
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            /** @var \sadykh\robokassa\Merchant $merchant */
            $merchant = Yii::$app->get('robokassa');
            return $merchant->payment($model->sum, $model->id, 'Пополнение счета', null, Yii::$app->user->identity->email);
        } else {
            return $this->render('invoice', [
                'model' => $model,
            ]);
        }
    }

	/**
	 * @inheritdoc
	 */
    public function actions()
    {
        return [
            'result' => [
                'class' => '\robokassa\ResultAction',
                'callback' => [$this, 'resultCallback'],
            ],
            'success' => [
                'class' => '\robokassa\SuccessAction',
                'callback' => [$this, 'successCallback'],
            ],
            'fail' => [
                'class' => '\robokassa\FailAction',
                'callback' => [$this, 'failCallback'],
            ],
        ];
    }

	/**
	 * Callback.
     * @param \sadykh\robokassa\Merchant $merchant merchant.
     * @param integer $nInvId invoice ID.
     * @param float $nOutSum sum.
     * @param array $shp user attributes.
	 */
    public function successCallback($merchant, $nInvId, $nOutSum, $shp)
    {
        $this->loadModel($nInvId)->updateAttributes(['status' => Invoice::STATUS_ACCEPTED]);
        return $this->goBack();
    }
    public function resultCallback($merchant, $nInvId, $nOutSum, $shp)
    {
        $this->loadModel($nInvId)->updateAttributes(['status' => Invoice::STATUS_SUCCESS]);
        return 'OK' . $nInvId;
    }
    public function failCallback($merchant, $nInvId, $nOutSum, $shp)
    {
        $model = $this->loadModel($nInvId);
        if ($model->status == Invoice::STATUS_PENDING) {
            $model->updateAttributes(['status' => Invoice::STATUS_FAIL]);
            return 'Ok';
        } else {
            return 'Status has not changed';
        }
    }

    /**
     * @param integer $id
     * @return Invoice
     * @throws \yii\web\BadRequestHttpException
     */
    protected function loadModel($id) {
        $model = Invoice::find($id);
        if ($model === null) {
            throw new BadRequestHttpException;
        }
        return $model;
    }
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~210 days

Recently: every ~153 days

Total

6

Last Release

3367d ago

### Community

Maintainers

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

---

Top Contributors

[![gonimar](https://avatars.githubusercontent.com/u/756571?v=4)](https://github.com/gonimar "gonimar (15 commits)")[![Sadykh](https://avatars.githubusercontent.com/u/2111827?v=4)](https://github.com/Sadykh "Sadykh (3 commits)")

---

Tags

yii2robokassa

### Embed Badge

![Health badge](/badges/sadykh-yii2-robokassa/health.svg)

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

###  Alternatives

[yii-cms/yii2-robokassa

Robokassa payment extension.

4364.6k1](/packages/yii-cms-yii2-robokassa)[yii2mod/yii2-cashier

Yii2 Cashier provides an interface to Stripe's subscription billing services.

467.3k](/packages/yii2mod-yii2-cashier)

PHPackages © 2026

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