9pay/bidv
Composer 安装命令:
composer require 9pay/bidv
包简介
Laravel/Lumen bidv banking library
关键字:
README 文档
README
This is the library that supports the connection to the BIDV banking system.
Note: This library is only usable with Laravel and Lumen
Installation
composer require 9pay/bidv
Laravel
For Laravel version <= 5.4
For Wallet
Add to section providers of config/app.php:
'providers' => [ ... NinePay\Bidv\Providers\BankServiceProvider::class, ];
And add to aliases section:
'aliases' => [ ... 'Bidv' => NinePay\Bidv\Facades\BidvFacade::class, ];
The library will use the data in the config file, so we need to publish config to use:
php artisan vendor:publish --provider="NinePay\Bidv\Providers\BankServiceProvider" --tag=config
For Gate
Add to section providers of config/app.php:
'providers' => [ ... NinePay\Bidv\Providers\GateServiceProvider::class, ];
And add to aliases section:
'aliases' => [ ... 'BidvGate' => NinePay\Bidv\Facades\GateFacade::class, ];
The library will use the data in the config file, so we need to publish config to use:
php artisan vendor:publish --provider="NinePay\Bidv\Providers\GateServiceProvider" --tag=config
Lumen
For Wallet
Open bootstrap/app.php and register the required service provider:
$app->register(NinePay\Bidv\Providers\BankServiceProvider::class);
And register class alias:
class_alias(NinePay\Bidv\Facades\BidvFacade::class, 'Bidv');
Facades must be enabled.
In Lumen, we can not create config file by Artisan CLI. So, you will create a config file with name bidv_wallet.php with content:
return [ 'url' => env('BIDV_WALLET_URL', ''), 'service_id' => env('BIDV_WALLET_SERVICE_ID', ''), 'merchant_id' => env('BIDV_WALLET_MERCHANT_ID', ''), 'private_key_bidv' => env('BIDV_WALLET_SECRET_KEY', ''), 'public_key_bidv' => '/test/example_public_key.pem', 'private_key_9pay' => '/test/example_private_key.pem', ];
And add it to bootstrap/app.php:
$app->configure('bidv_wallet');
For Gate
Open bootstrap/app.php and register the required service provider:
$app->register(NinePay\Bidv\Providers\GateServiceProvider::class);
And register class alias:
class_alias(NinePay\Bidv\Facades\GateFacade::class, 'BidvGate');
Facades must be enabled.
In Lumen, we can not create config file by Artisan CLI. So, you will create a config file with name bidv_gate.php with content:
return [ 'url' => env('BIDV_GATE_URL', ''), 'service_id' => env('BIDV_GATE_SERVICE_ID', ''), 'merchant_id' => env('BIDV_GATE_MERCHANT_ID', ''), 'private_key_bidv' => env('BIDV_GATE_SECRET_KEY', ''), 'public_key_bidv' => '/test/example_public_key.pem', 'private_key_9pay' => '/test/example_private_key.pem', ];
And add it to bootstrap/app.php:
$app->configure('bidv_gate');
Certificate
Library will use RSA to encrypt and decrypt so there should be 2 files public_key and private_key
Methods
Wallet
| Name | Method |
|---|---|
| Connect Wallet with BIDV | \Bidv::link($param); |
| Disconnet wallet with BIDV | \Bidv::unlink($param); |
| Withdraw wallet | \Bidv::wallet2Bank($param); |
| Deposit wallet | \Bidv::bank2Wallet($param); |
| Check account connect BIDV | \Bidv::checkLink($param); |
| Check OTP | \Bidv::checkOtp($param); |
| Check Provider Balance | \Bidv::checkProviderBalance($param); |
| Inquiry | \Bidv::inquiry($param); |
Gate
| Name | Method |
|---|---|
| Inquiry | \BidvGate::inquiry($param); |
| Verify | \BidvGate::verify($param); |
| Inittrans | \BidvGate::inittrans($param); |
| Refund | \BidvGate::refund($param); |
Param
Input data for the above methods will not be included the following variables: Service_Id, Merchant_Id, Secure_Code because the library will be generated it.
Response
The returned data will look like this:
array( 'RESPONSE_CODE' => '000', 'MESSAGE' => '', 'IS_CORRECT_SIGN' => false, //... )
RESPONSE_CODE backs to 000 is successful. If not, it fail.
MESSAGE is description of result data.
IS_CORRECT_SIGN is a sign shows that returned data is valid.
License
9pay/bidv 适用场景与选型建议
9pay/bidv 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 459 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 12 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「9pay」 「9pay bidv」 「bidv」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 9pay/bidv 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 9pay/bidv 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 9pay/bidv 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel package for cryptomus.com
9Pay Micro Invest NAV Crawler
Laravel/Lumen bidv banking library
Laravel package for 9pay.vn
9Pay Crawler for Telco Promotion
Laravel package for vitepay.dev
统计信息
- 总下载量: 459
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 36
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-04