PHPackages                             stitchua/yii2-tpay - 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. stitchua/yii2-tpay

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

stitchua/yii2-tpay
==================

It is a module for basic implementation of payment system of tpay.com

v1.0.0(1y ago)00BSD-3-ClausePHPPHP &gt;=7.4.0

Since Sep 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/StitchUA/yii2-tpay)[ Packagist](https://packagist.org/packages/stitchua/yii2-tpay)[ RSS](/packages/stitchua-yii2-tpay/feed)WikiDiscussions main Synced 1mo ago

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

yii2-tpay
=========

[](#yii2-tpay)

Payment system tpay.com Basic implementation

```
php yii migrate --migrationPath="@stitchua/tpay/migrations"

```

Instalacja
----------

[](#instalacja)

Zalecany sposób instalacji przez [composer](http://getcomposer.org/download/)

Możesz uruchomić

```
php composer.phar require --prefer-dist ststichua/yii2-tpay

```

lub dodać

```
"stitchua/yii2-tpay":"*"

```

do sekcji `require` twojego composer.json

Po instalacji pakietu należy uruchomić migrację (w konsoli):

```
php yii migrate --migrationPath="@stitchua/tpay/migrations"

```

Konfiguracja
------------

[](#konfiguracja)

Do konfigurowania modułu służą:

- `merchantId` - ID konta w systemie płatnościowym Tpay
- `merchantCode` - Security code from Tpay panel
- `validateServerIP` - zmienna służąca do wyłączenia sprawdzenia dedykowanych IP serwerów serwisu Tpay (dla celów debugowania)

Przykładowa konfiguracja `config/web.php`:

```
'tpay' => [
    'class' => 'stitchua\\tpay\\Tpay',
    'merchantId' => 77700,
    'merchantCode' => 'AT6oNO0F5ntQQQXxX',
    'validateServerIP' => false
],
```

### Jak korzystyać

[](#jak-korzystyać)

Na dziś biblioteka realizyje generowania linku HTTP do płatności.

```
    $tpayModule = Yii::$app->getModule('tpay');
    $basicPayload = new TpayBasicPayloadCommercialSale($this);
    $basicPayload->setExpirationDate(DateHelper::now()->addMinutes(2)->format('Y:m:d:H:i'));
    $basicPayload->setReturnUrl(Yii::$app->urlManager->createAbsoluteUrl(['/mobile/payment/paymentlandingpage', 'result' => 'success']));
    $basicPayload->setReturnErrorUrl(Yii::$app->urlManager->createAbsoluteUrl(['/site/paymentlandingpage', 'result' => 'error']));
    /** @var TpayNoApiPayload $payload */
    $payload = null;
    $link = (new IntegrationWithoutAPI($tpayModule))->getPaymentLink($basicPayload, $payload);
    if(!empty($link)){
        $this->updateAttributes([
            'fld_payment_crc' => $payload->crc,
            'fld_status' => self::STATUS_IN_PAYMENT,
        ]);
    }
    // Tutaj link już jest wygenerowany
    return $link;
```

Klasa `TpayBasicPayloadCommercialSale` powinna zrealizować interface `stitchua\tpay\base\ILinkPayload`

```
class TpayBasicPayloadCommercialSale extends \yii\base\Model implements \stitchua\tpay\base\ILinkPayload
{

}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

613d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/826c3130f9dea7b0b5b0ab1874efa3829308cfc1ca0d6bdc12e4d5a3d45212a3?d=identicon)[StitchUA](/maintainers/StitchUA)

---

Top Contributors

[![StitchUA](https://avatars.githubusercontent.com/u/3766841?v=4)](https://github.com/StitchUA "StitchUA (45 commits)")

---

Tags

yii2extensionpaymenttpaystitchuayii2 tpayyii2 payment systempayment system tpay

### Embed Badge

![Health badge](/badges/stitchua-yii2-tpay/health.svg)

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

PHPackages © 2026

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