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

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

kriss/yii2-bd-payment
=====================

Yii2 必答支付的组件

v2.4(6y ago)0100MITPHP

Since Jan 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/krissss/yii2-bd-payment)[ Packagist](https://packagist.org/packages/kriss/yii2-bd-payment)[ RSS](/packages/kriss-yii2-bd-payment/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (2)Versions (9)Used By (0)

Yii2 必答支付的组件
============

[](#yii2-必答支付的组件)

> Yii2 必答支付的组件，仅适用于`必答支付`

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

[](#installation)

```
php composer.phar require --prefer-dist kriss/yii2-bd-payment -vvv

```

Basic Usage
-----------

[](#basic-usage)

### Config

[](#config)

```
use kriss\bd\payment\Payment;

$config = [
    'components' => [
        Payment::COMPONENT_NAME => [
            'class' => Payment::class,
            'ak' => 'ak_20180110171926539048',
            'sk' => 'sk_609706e2f87affb77eefe5abd799057x',
            'logCategory' => 'bd-pay',
            'isTest' => true,
            'version' => '2.0',
        ]
    ]
]
```

### Get Component

[](#get-component)

```
$payment = Payment::getInstance();
```

### Start Pay

[](#start-pay)

see [PayController.php](https://github.com/krissss/yii2-bd-payment/blob/master/examples/PayController.php)

see [OrderPayForm.php](https://github.com/krissss/yii2-bd-payment/blob/master/examples/OrderPayForm.php)

### Handle Notify

[](#handle-notify)

see [PayNotifyController.php](https://github.com/krissss/yii2-bd-payment/blob/master/examples/PayNotifyController.php)

Use More Than One Component
---------------------------

[](#use-more-than-one-component)

### Create another class extend `Payment`

[](#create-another-class-extend-payment)

```
namespace common\components;

use kriss\bd\payment\Payment;

class AnotherPayment extends Payment
{
    const COMPONENT_NAME = 'another-db-payment';
}
```

### Config

[](#config-1)

```
use kriss\bd\payment\Payment;

$config = [
    'components' => [
        Payment::COMPONENT_NAME => [
            'class' => Payment::class,
            'ak' => 'ak_20180110171926539048',
            'sk' => 'sk_609706e2f87affb77eefe5abd799057x',
            'logCategory' => 'bd-pay',
            'isTest' => true,
            'version' => '2.0',
        ],
        AnotherPayment::COMPONENT_NAME => [
            'class' => AnotherPayment::class,
            'ak' => 'ak_20180110171926539049',
            'sk' => 'sk_609706e2f87affb77eefe5abd799057y',
            'logCategory' => 'another-bd-pay',
            'isTest' => true,
            'version' => '2.0',
        ],
    ]
]
```

### Get Component

[](#get-component-1)

```
$payment = Payment::getInstance();
$anotherPayment = AnotherPayment::getInstance();
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

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

Recently: every ~159 days

Total

8

Last Release

2253d ago

Major Versions

v1.2 → v2.02018-08-02

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

yii2bd-payment

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.0k](/packages/craftcms-cms)

PHPackages © 2026

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