PHPackages                             kongoon/yii2-paypal - 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. kongoon/yii2-paypal

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

kongoon/yii2-paypal
===================

The PayPal extension for the Yii2 framework based on marciocamello/yii2-paypal

v0.1.3(10y ago)21.1k11BSD-3-ClausePHPPHP &gt;=5.3.0

Since May 16Pushed 10y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (2)Versions (8)Used By (1)

PayPal extension for the Yii2
=============================

[](#paypal-extension-for-the-yii2)

PayPal payment extension for the Yii2.

Installation
============

[](#installation)

Add to the composer.json file following section:

```
php composer.phar require --prefer-dist kongoon/yii2-paypal "*"

```

```
"kongoon/yii2-paypal": "dev-master"

```

Add to to you Yii2 config file this part with component settings:

```
'paypal'=> [
    'class'        => 'kongoon\yii2\paypal\Paypal',
    'clientId'     => 'you_client_id',
    'clientSecret' => 'you_client_secret',
    'isProduction' => false,
     // This is config file for the PayPal system
     'config'       => [
         'http.ConnectionTimeOut' => 30,
         'http.Retry'             => 1,
         'mode'                   => \kongoon\yii2\Paypal::MODE_SANDBOX, 	// sandbox | live
         'log.LogEnabled'         => YII_DEBUG ? 1 : 0,
         'log.FileName'           => '@runtime/logs/paypal.log',
         'log.LogLevel'           => \kongoon\yii2\Paypal::LOG_LEVEL_FINE,	// FINE | INFO | WARN | ERROR
    ]
],
```

How Use
=======

[](#how-use)

```
private function pay() {
    Yii::$app->paypal->init();
    $apiContext = Yii::$app->paypal->getApiContext();

    // [..]

    $payment = new Payment();

    try {
        $payment->create($apiContext);
    } catch (Exception $ex) {
        echo PaypalError($e);
        exit(1);
    }
    $approvalUrl = $payment->getApprovalLink();
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55.1% 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 ~232 days

Total

4

Last Release

3689d ago

PHP version history (2 changes)v0.1.0PHP &gt;=5.5.0

v0.1.2PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/86f6039ff91096fdc7208910a7d50f3388ae16ab4d6b0f2281c7c3d9e3314dc1?d=identicon)[kongoon](/maintainers/kongoon)

---

Top Contributors

[![aklim](https://avatars.githubusercontent.com/u/2071995?v=4)](https://github.com/aklim "aklim (27 commits)")[![kongoon](https://avatars.githubusercontent.com/u/186737?v=4)](https://github.com/kongoon "kongoon (10 commits)")[![marciocamello](https://avatars.githubusercontent.com/u/4071580?v=4)](https://github.com/marciocamello "marciocamello (10 commits)")[![blackout314](https://avatars.githubusercontent.com/u/818568?v=4)](https://github.com/blackout314 "blackout314 (2 commits)")

---

Tags

yii2paypal

### Embed Badge

![Health badge](/badges/kongoon-yii2-paypal/health.svg)

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

###  Alternatives

[marciocamello/yii2-paypal

The PayPal extension for the Yii2 framework

385.2k](/packages/marciocamello-yii2-paypal)

PHPackages © 2026

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