PHPackages                             ninepay/bidv - 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. ninepay/bidv

ActiveLibrary[Payment Processing](/categories/payments)

ninepay/bidv
============

Laravel/Lumen bidv banking library

01PHP

Since Mar 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/vanket90/bidv)[ Packagist](https://packagist.org/packages/ninepay/bidv)[ RSS](/packages/ninepay-bidv/feed)WikiDiscussions main Synced 4d ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

BIDV Library
============

[](#bidv-library)

This is the library that supports the connection to the BIDV banking system.

**Note:** This library is only usable with **Laravel** and **Lumen**

Installation
============

[](#installation)

```
composer require 9pay/bidv
```

Laravel
-------

[](#laravel)

For Laravel version &gt;= **5.4**

### For Wallet

[](#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

[](#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
-----

[](#lumen)

### For Wallet

[](#for-wallet-1)

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

[](#for-gate-1)

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
===========

[](#certificate)

Library will use RSA to encrypt and decrypt so there should be 2 files `public_key` and `private_key`

Methods
=======

[](#methods)

Wallet
------

[](#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
----

[](#gate)

**Name****Method**Inquiry*\\BidvGate::inquiry($param);*Verify*\\BidvGate::verify($param);*Inittrans*\\BidvGate::inittrans($param);*Refund*\\BidvGate::refund($param);*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
========

[](#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
=======

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/06321fa933e2d5e66f640ee129ee5aa0c1158b0861d3da6c4886feb0930d29be?d=identicon)[vanket90](/maintainers/vanket90)

---

Top Contributors

[![vanket90](https://avatars.githubusercontent.com/u/18657954?v=4)](https://github.com/vanket90 "vanket90 (3 commits)")

### Embed Badge

![Health badge](/badges/ninepay-bidv/health.svg)

```
[![Health](https://phpackages.com/badges/ninepay-bidv/health.svg)](https://phpackages.com/packages/ninepay-bidv)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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