PHPackages                             kroshilin/yii2-yandex-kassa - 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. kroshilin/yii2-yandex-kassa

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

kroshilin/yii2-yandex-kassa
===========================

Yandex kassa as Yii2 component

0.1.5(9y ago)2931.0k↓43.8%9[1 issues](https://github.com/kroshilin/yii2-yandex-kassa/issues)BSD-3-ClausePHP

Since Apr 28Pushed 8y ago2 watchersCompare

[ Source](https://github.com/kroshilin/yii2-yandex-kassa)[ Packagist](https://packagist.org/packages/kroshilin/yii2-yandex-kassa)[ RSS](/packages/kroshilin-yii2-yandex-kassa/feed)WikiDiscussions master Synced 1mo ago

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

Yandex Kassa
============

[](#yandex-kassa)

Yandex kassa as Yii2 component

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist kroshilin/yii2-yandex-kassa "*"

```

or add

```
"kroshilin/yii2-yandex-kassa": "*"

```

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

Usage
-----

[](#usage)

First, add extension under the components section of your config.php

```
'components' => [
	...
	'yakassa' => [
		'class' => 'kroshilin\yakassa\YaKassa',
		'paymentAction' => YII_DEBUG ? 'https://demomoney.yandex.ru/eshop.xml' : 'https://money.yandex.ru/eshop.xml',
		'shopPassword' => 'password',
		'securityType' => 'MD5',
		'shopId' => '12345',
		'scId' => '123',
		'currency' => '10643'
	]
	...
]

```

Create controller and configure actions for checkOrder and paymentAviso yandex requests If need, you can use callable 'beforeResponse' property of actions, to define additional checks of Yandex's requests. Depends on result of 'beforeResponse' (true||false) action would generate corresponding response.

```
class YaKassaController extends Controller
{
    public function behaviors()
    {
        return [
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'order-check' => ['post'],
                    'payment-notification' => ['post'],
                ],
            ]
        ];
    }

    public function actions()
    {
        return [
            'order-check' => [
                'class' => 'app\components\yakassa\actions\CheckOrderAction',
                'beforeResponse' => function ($request) {
                    /**
                     * @var \yii\web\Request $request
                     */
                    $invoice_id = (int) $request->post('orderNumber');
		                Yii::warning("Кто-то хотел купить несуществующую подписку! InvoiceId: {$invoice_id}", Yii::$app->yakassa->logCategory);
                    return false;
                }
            ],
            'payment-notification' => [
                'class' => 'app\components\yakassa\actions\PaymentAvisoAction',
                'beforeResponse' => function ($request) {
                    /**
                     * @var \yii\web\Request $request
                     */
                }
            ],
        ];
    }
}

```

Using widget is simple. You have to implement 2 interfaces. First is OrderInterface for your order model, to pass sum and id to form. Second is Customer interface, to pass customer id and pre-fill phone and email if exist.

```
echo kroshilin\yakassa\widgets\Payment::widget([
    'order' => $order,
    'userIdentity' => Yii::$app->user->identity,
	'data' => ['customParam' => 'value'],
	'paymentType' => ['PC' => 'Со счета в Яндекс.Деньгах', 'AC' => 'С банковской карты']
]);

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.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 ~46 days

Recently: every ~57 days

Total

6

Last Release

3441d ago

### Community

Maintainers

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

---

Top Contributors

[![kroshilin](https://avatars.githubusercontent.com/u/10268995?v=4)](https://github.com/kroshilin "kroshilin (11 commits)")[![dudareviv](https://avatars.githubusercontent.com/u/1499027?v=4)](https://github.com/dudareviv "dudareviv (3 commits)")[![dkushnikov](https://avatars.githubusercontent.com/u/1129911?v=4)](https://github.com/dkushnikov "dkushnikov (1 commits)")

---

Tags

yii2extensionyandexyandex-moneyyandex-kassa

### Embed Badge

![Health badge](/badges/kroshilin-yii2-yandex-kassa/health.svg)

```
[![Health](https://phpackages.com/badges/kroshilin-yii2-yandex-kassa/health.svg)](https://phpackages.com/packages/kroshilin-yii2-yandex-kassa)
```

PHPackages © 2026

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