PHPackages                             9pay/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. 9pay/bidv

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

9pay/bidv
=========

Laravel/Lumen bidv banking library

0446PHP

Since Dec 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/boydepdai92/bidv)[ Packagist](https://packagist.org/packages/9pay/bidv)[ RSS](/packages/9pay-bidv/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (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 &lt;= **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

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

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/7631aab95a313ecb1b2e0a0fee5303acbe4bcbee49c5702dd21e9bc88ca7fb90?d=identicon)[boydepdai92](/maintainers/boydepdai92)

---

Top Contributors

[![boydepdai92](https://avatars.githubusercontent.com/u/10055241?v=4)](https://github.com/boydepdai92 "boydepdai92 (5 commits)")

### Embed Badge

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

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

###  Alternatives

[dompdf/php-font-lib

A library to read, parse, export and make subsets of different types of font files.

1.8k31.2M9](/packages/dompdf-php-font-lib)[geertw/ip-anonymizer

IPv4 and IPv6 address anonymizer

60238.3k1](/packages/geertw-ip-anonymizer)[usu/codice-fiscale

A library to calculate and check the validity of the italian fiscal code (codice fiscale)

23170.9k1](/packages/usu-codice-fiscale)[kzykhys/steganography

Simple implementation of Steganography (Hiding a hidden message within an image)

889.7k](/packages/kzykhys-steganography)[furqansiddiqui/ethereum-php

A modern, dependency-light Ethereum library powered by a clean cryptographic core

1724.9k1](/packages/furqansiddiqui-ethereum-php)[crisen/ai

优雅的ai客户端

265.5k1](/packages/crisen-ai)

PHPackages © 2026

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