PHPackages                             bbcsky/yii2-payment - 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. bbcsky/yii2-payment

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

bbcsky/yii2-payment
===================

The yii2 payment extension for alipay and weixin

0.1.0(10y ago)8835BSD-3-ClausePHP

Since Dec 23Pushed 10y ago3 watchersCompare

[ Source](https://github.com/bbcsky/yii2-payment)[ Packagist](https://packagist.org/packages/bbcsky/yii2-payment)[ RSS](/packages/bbcsky-yii2-payment/feed)WikiDiscussions master Synced 4w ago

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

Payments Alipay, Weixin and Balance for Yii 2
=============================================

[](#payments-alipay-weixin-and-balance-for-yii-2)

The yii2 payment extension for alipay, weixin and balance

For license information check the [LICENSE](LICENSE.md)-file.

Requirements
------------

[](#requirements)

None

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist bbcsky/yii2-payment

```

or add

```
"bbcsky/yii2-payment": "*"
```

to the require section of your composer.json.

Configuration
-------------

[](#configuration)

To use this extension, you have to configure the Connection class in your application configuration:

```
return [
    //....
    'components' => [
        'payment' => [
            'class'=>'bbcsky\payment\Instance',
                'alipay_config' => [
                    'code'         => 1,
                    'partner'      => '112345654323',
                    'key_path'     => '@app/cert/key.pem',
                    'ali_pub_path' => '@app/cert/alipay.pem',
                    'ali_ca_path'  => '@app/cert/cacert.pem',
                    'key'          => 'sbf6tj8cn6zsdqweqeqeazbigiqcibext',
                ],
                'weixin_config' => [
                    'code'      => 2,
                    'appid'     => 'wxb7d65asd123131338',
                    'secret'    => 'cb0b13123131231231sfasfe945db4',
                    'mch_id'    => '124567887',
                    'key'       => '99a4cb12313131ffsdfasfqcc392e5',
                    'cert_path' => '@app/cert/weixin_cert.pem',
                    'key_path'  => '@app/cert/weixin_key.pem',
                ],
                'weixins_config' => [
                    'code'      => 4,
                    'appid'     => 'wx312313131352asssss',
                    'secret'    => 'cb0b13123131231231sfasfe945db4',
                    'mch_id'    => '124567887',
                    'key'       => '99a4cb12313131ffsdfasfqcc392e5',
                    'cert_path' => '@app/cert/weixins_cert.pem',
                    'key_path'  => '@app/cert/weixins_key.pem',
                ],
                'balance_config' => [
                    'code' => 3,
                    'balance_callable'=>'\app\models\Account::balance',
                    'balance_callable_cost'=>'\app\models\Account::balanceCost',
                    'balance_callable_refund'=>'\app\models\Account::balanceRefund',
                ],
        ],
    ]
];
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

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

3841d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8664064?v=4)[bbcsky](/maintainers/bbcsky)[@bbcsky](https://github.com/bbcsky)

---

Top Contributors

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

---

Tags

yii2paymentalipayweixinapp pay

### Embed Badge

![Health badge](/badges/bbcsky-yii2-payment/health.svg)

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

PHPackages © 2026

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