2017 © Pedro Peláez
 

yii2-extension yii2-bd-payment

Yii2 必答支付的组件

image

kriss/yii2-bd-payment

Yii2 必答支付的组件

  • Tuesday, January 30, 2018
  • by kriss
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 29 % Grown

The README.md

Yii2 必答支付的组件

Yii2 必答支付的组件,仅适用于必答支付, (*1)

Installation

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

Basic Usage

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

$payment = Payment::getInstance();

Start Pay

see PayController.php, (*2)

see OrderPayForm.php, (*3)

Handle Notify

see PayNotifyController.php, (*4)

Use More Than One Component

Create another class extend Payment

namespace common\components;

use kriss\bd\payment\Payment;

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

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',
        ],
        AnotherPayment::COMPONENT_NAME => [
            'class' => AnotherPayment::class,
            'ak' => 'ak_20180110171926539049',
            'sk' => 'sk_609706e2f87affb77eefe5abd799057y',
            'logCategory' => 'another-bd-pay',
            'isTest' => true,
            'version' => '2.0',
        ],
    ]
]

Get Component

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

The Versions

30/01 2018

dev-master

9999999-dev

Yii2 必答支付的组件

  Sources   Download

MIT

The Requires

 

by Avatar kriss

yii2 bd-payment

30/01 2018

v1.2

1.2.0.0

Yii2 必答支付的组件

  Sources   Download

MIT

The Requires

 

by Avatar kriss

yii2 bd-payment

23/01 2018

v1.1

1.1.0.0

Yii2 必答支付的组件

  Sources   Download

MIT

The Requires

 

by Avatar kriss

yii2 bd-payment

23/01 2018

v1.0

1.0.0.0

Yii2 必答支付的组件

  Sources   Download

MIT

The Requires

 

by Avatar kriss

yii2 bd-payment