PHP code example of kriss / yii2-bd-payment
1. Go to this page and download the library: Download kriss/yii2-bd-payment library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kriss / yii2-bd-payment example snippets
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',
]
]
]
$payment = Payment::getInstance();
namespace common\components;
use kriss\bd\payment\Payment;
class AnotherPayment extends Payment
{
const COMPONENT_NAME = 'another-db-payment';
}
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',
],
]
]
$payment = Payment::getInstance();
$anotherPayment = AnotherPayment::getInstance();