PHPackages                             silentlun/yii2-alipay - 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. silentlun/yii2-alipay

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

silentlun/yii2-alipay
=====================

Alipay extension for YII2

1.1(4y ago)011BSD-3-ClausePHP

Since Mar 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/silentlun/yii2-alipay)[ Packagist](https://packagist.org/packages/silentlun/yii2-alipay)[ RSS](/packages/silentlun-yii2-alipay/feed)WikiDiscussions main Synced 2d ago

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

yii2-alipay
===========

[](#yii2-alipay)

Alipay extension for YII2

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist silentlun/yii2-alipay "*"

```

or add

```
"silentlun/yii2-alipay": "*"

```

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

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

#### Controller

[](#controller)

```
namespace app\controllers;

use yii\web\Controller;
use silentlun\alipay\AliPay;

class SiteController extends Controller
{
    public $alipayConfig = [
        'app_id' => '支付宝应用ID',
        'merchant_private_key' => '支付宝私钥',
        'alipay_public_key' => '支付宝公钥',
    ];
    public function actionPay()
    {
        $order = []; // 订单信息
        $payment = new AliPay($this->alipayConfig);
        $result = $payment->createWebPay($order);
        return $this->renderPartial('alipay', [
            'result' => $result,
        ]);
    }
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Every ~243 days

Total

2

Last Release

1651d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77e448a626a78a92eee5ccb5303bbbcaae55f00e4414f769f295b4f7f72b05ad?d=identicon)[silentlun](/maintainers/silentlun)

---

Top Contributors

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

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/silentlun-yii2-alipay/health.svg)

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

PHPackages © 2026

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