定制 systemfive/bni-e-collection-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

systemfive/bni-e-collection-sdk

Composer 安装命令:

composer require systemfive/bni-e-collection-sdk

包简介

Unofficial SDK of BNI E-Collection

README 文档

README

README

An extension to get and request BNI eCollection, this library cover function bellow

  • Create VA
  • Update VA
  • Inquiry VA
  • Callback VA

Usage

basic usage create VA / Invoice

require 'vendor/autoload.php';

use SystemFive\BNIEcollection;

$request = new BNIEcollection("YOUR_SECRET_KEY");
$data_asli = [
    'client_id' => "YOUR_CID",
    'trx_id' => mt_rand(), // fill with Billing ID
    'trx_amount' => 10000,
    'billing_type' => 'c',
    'datetime_expired' => date('c', time() + 2 * 3600), // billing will be expired in 2 hours
    'virtual_account' => '',
    'type' => \SystemFive\Requests\BNIRequest::CREATE_BILLING,
    'customer_name' => 'Name',
    'customer_email' => 'indra.ganteng@gmail.com',
    'customer_phone' => '0812142676xx',
];

try {
    $request->request_data($data_asli, \SystemFive\Requests\BNIRequest::CREATE_BILLING, \SystemFive\Requests\BNIRequest::FIXED_PAYMENT);
    $response = $request->getResponse();
    var_dump($response);
} catch (Exception $e) {
    var_dump($e->getMessage());
} catch (\GuzzleHttp\Exception\GuzzleException $e) {
    var_dump($e->getMessage());
}

there are have 4 type request

  • createbilling
  • createbillingsms
  • inquirybilling
  • updatebilling

for response you can see docs of BNI E-Collection API . let contact BNI CS

Usage for Retrieve Callback


$callbackFromBNI = [
    "client_id"=>"YOUR_CID_FROM_CALLBACK",
    "data"=>"YOUR_HASH_DATA"
];

\SystemFive\Core\BNIEnc::decrypt($callbackFromBNI["data"],$callbackFromBNI["client_id"],"YOUR_SECRET");

Yup It's Done

You can help me buy a coffee with PAYPAL on indra.gunanda@gmail.com

VvV if you Indonesian you can use this VvV

image

统计信息

  • 总下载量: 46
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2021-04-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固