PHPackages                             grandmasterx/interkassa - 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. grandmasterx/interkassa

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

grandmasterx/interkassa
=======================

Extension for integration Interkassa in yii2 project

v1.0.4(7y ago)02.2kBSD-3-ClausePHPPHP &gt;=7.0

Since Nov 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/GrandMasterX/interkassa)[ Packagist](https://packagist.org/packages/grandmasterx/interkassa)[ RSS](/packages/grandmasterx-interkassa/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

[![Build Status](https://camo.githubusercontent.com/49e4caccf28d60b556b43a4708d8ce4bfd92b0886e65fecc83b12e1e1a57d54e/68747470733a2f2f7472617669732d63692e6f72672f6772616e646d6173746572782f696e7465726b617373612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/grandmasterx/interkassa)

Yii2 Interkassa
===============

[](#yii2-interkassa)

Extension for integration Interkassa in yii2 project. WIP.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist grandmasterx/interkassa "*"

```

or add

```
"grandmasterx/interkassa": "*"

```

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

Update config file config/web.php

```
return [
    'components' => [
        'interkassa' => [
            'class' => 'grandmasterx\interkassa\Component',
            'co_id' => '', // Cashbox identifier
            'secret_key' => '', // Cashbox secret key
            'test_key' => '', // Cashbox test secret key
            'sign_algo' => 'md5', // Sign algoritm. Allow: md5, sha1
            'api_user_id' => '', // Api user id
            'api_user_key' => '' // Api user secret key
        ],
    ],
]
```

Usage
-----

[](#usage)

Example payment:

```
class InterkassaController extends Controller
{
    public function actions() {
        return [
            'result' => [
                'class' => 'grandmasterx\interkassa\ResultAction',
                'callback' => [$this, 'resultCallback'],
            ],
            'success' => [
                'class' => 'grandmasterx\interkassa\SuccessAction',
                'callback' => [$this, 'successCallback'],
            ],
            'fail' => [
                'class' => 'grandmasterx\interkassa\FailAction',
                'callback' => [$this, 'failCallback'],
            ],
        ];
    }

    public function actionInvoice()
    {
        $model = new Invoice();

        if ($model->load(Yii::$app->request) && $model->save())
        {
            $params = [
                'ik_pm_no' => $model->id,
                'ik_am' => $model->ammount,
                'ik_desc' => 'Site payment',
            ];

            return Yii::$app->interkassa->payment($params);
        }

        return $this->render('invoice', compact($model));
    }

    public function successCallback($ik_am, $ik_inv_st, $ik_pm_no)
    {
        return $this->render('success');
    }

    public function failCallback($ik_am, $ik_inv_st, $ik_pm_no)
    {
        return $this->render('fail');
    }

    public function resultCallback($ik_am, $ik_inv_st, $ik_pm_no)
    {

        switch ($ik_inv_st)
        {
            case 'new':
                $this->loadModel($ik_pm_no)->updateAttributes(['status' => Invoice::STATUS_NEW]);
                break;
            case 'waitAccept':
                $this->loadModel($ik_pm_no)->updateAttributes(['status' => Invoice::STATUS_PENDING]);
                break;
            case 'process':
                $this->loadModel($ik_pm_no)->updateAttributes(['status' => Invoice::STATUS_PROCESS]);
                break;
            case 'success':
                $this->loadModel($ik_pm_no)->updateAttributes(['status' => Invoice::STATUS_SUCCESS]);
                break;
            case 'canceled':
                $this->loadModel($ik_pm_no)->updateAttributes(['status' => Invoice::STATUS_CANCELED]);
                break;
            case 'fail':
                $this->loadModel($ik_pm_no)->updateAttributes(['status' => Invoice::STATUS_FAIL])
                break;
        }
    }

    protected function loadModel($id)
    {
        $model = Invoice::findOne($id);

        if ($model === null)
            throw new BadRequestHttpException;

        return $model;
    }
}
```

Example withdraw:

```
class Withdraw
{
    protected $purse_name = 'My Purse Name';

    public function process($id)
    {
        $withdraw = Withdraw::findOne($id);

        if ($withdraw === null)
            throw new BadRequestHttpException;

        try {
            $result = Yii::$app->interkassa->withdraw(
                $withdraw->id,
                $this->purse_name,
                $withdraw->payway_name,
                ['purse' => $withdraw->purse],
                $withdraw->amount,
                'psPayeeAmount',
                'process'
            );
        } catch (WithdrawException $e) {
            return $e->getMessage();
        }
    }
}
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~108 days

Total

4

Last Release

2824d ago

PHP version history (2 changes)v1.0.1PHP &gt;=5.6

v1.0.4PHP &gt;=7.0

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

yii2extensionInterkassa

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/grandmasterx-interkassa/health.svg)

```
[![Health](https://phpackages.com/badges/grandmasterx-interkassa/health.svg)](https://phpackages.com/packages/grandmasterx-interkassa)
```

PHPackages © 2026

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