PHPackages                             uocnv/baokim-payment - 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. uocnv/baokim-payment

ActiveLibrary[Payment Processing](/categories/payments)

uocnv/baokim-payment
====================

A client to connect to Bao Kim payment gateway

1.2(1y ago)012MITPHPPHP ^8.1|^8.2

Since Mar 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/NguyenUoc98/baokim-payment)[ Packagist](https://packagist.org/packages/uocnv/baokim-payment)[ Docs](https://git.1lib.vn/123doc-vn/product/baokim-payment)[ RSS](/packages/uocnv-baokim-payment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (5)Used By (0)

Laravel Bao Kim Payment
=======================

[](#laravel-bao-kim-payment)

Package is the source set to connect to Bao Kim's payment gateways, including the following forms: ATM/QR, Momo official, VA, Disbursement

Feature
-------

[](#feature)

\[x\] Log request, webhook response, error

\[x\] Multiple key

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require uocnv/baokim-payment
```

Usage
-----

[](#usage)

### ATM/QR, Momo Official, Mobile card

[](#atmqr-momo-official-mobile-card)

- Get a list of banks:

```
$arrayBanks = Uocnv\BaokimPayment\Clients\ATM::getBankList();
```

- Request to create payment order of ATM/QR:

```
$transactionId = 'abc123';
$amount        = 110000;
$bankId        = 124; // $bankId = 0 nếu là hình thức QR
$referer       = 'http://example.com';
$email         = $user->use_email;
$phone         = $user->use_phone;
$dataRequest = Uocnv\BaokimPayment\Clients\ATM::request(
    transactionId: $transactionId,
    amount       : $amount,
    bankId       : $bankId,
    referer      : $referer,
    userEmail    : $email,
    userPhone    : $phone
);
```

- Request to create payment order of Mobile card:

```
$transactionId   = DB::table('money_mobile_cards')->insertGetID([]);
$amount          = 110000;
$pin             = '071608559897';
$serial          = '098353000029197';
$telecomOperator = Uocnv\BaokimPayment\Enums\TelecomOperator::VIETTEL;
$dataRequest     = Uocnv\BaokimPayment\Clients\MobileCard::request(
    transactionId  : $transactionId,
    amount         : $amount,
    pin            : $pin,
    serial         : $serial,
    telecomOperator: $telecomOperator
);
```

- Check the integrity of data received from webhooks:

```
$webhookData  = $request->all();
$verifiedData = Uocnv\BaokimPayment\Clients\ATM::checkValidData($webhookData);
```

### Collection payment &amp; Disbursement payments

[](#collection-payment--disbursement-payments)

- Create new virtual account:

```
try {
    $vaClient = new Uocnv\BaokimPayment\Clients\VA('production');
    $data     = $vaClient->registerVirtualAccount(
        accName   : 'CONG THANH TOAN',
        orderId   : 'trans' . rand(1, 99) . time(),
        amountMax : 5000000,
        expireDate: Carbon::now()->addDay()->format('Y-m-d H:i:s')
    );
} catch (GuzzleException|CollectionRequestException|SignFailedException) {
}
```

- Update virtual account:

```
try {
    $vaClient = new Uocnv\BaokimPayment\Clients\VA('production');
    $data     = $vaClient->updateVirtualAccount(
        accName   : 'CONG THANH TOAN',
        orderId   : 'trans' . rand(1, 99) . time(),
        amountMax : 5000000,
        expireDate: Carbon::now()->addDay()->format('Y-m-d H:i:s')
    );
} catch (GuzzleException|CollectionRequestException|SignFailedException) {
}
```

- Check the integrity of data received from webhooks:

```
$vaClient      = new Uocnv\BaokimPayment\Clients\VA('production');
$webhookData   = $request->getContent();
$dataValidated = $vaClient->checkValidData($webhookData);
```

- Look up for Partner balance:

```
$disbursement = new Uocnv\BaokimPayment\Clients\Disbursement('production');
try {
    $data    = $disbursement->lookUpForBalance();
    $balance = $data['Available'];
} catch (GuzzleException|CollectionRequestException|SignFailedException) {
}
```

- Look up for transfer info:

```
$disbursement = new Uocnv\BaokimPayment\Clients\Disbursement('production');
try {
    $referenceId = 'gd_123123';
    $data    = $disbursement->lookUpForTransferInfo($referenceId);
} catch (GuzzleException|CollectionRequestException|SignFailedException) {
}
```

- Verify customer information

```
$disbursement = new Uocnv\BaokimPayment\Clients\Disbursement('production');
try {
    $accNo   = '21110001400973';
    $bankNo  = 970437; // Get from Uocnv\BaokimPayment\Clients\Disbursement::BANK_TRANSFER_ASSISTANCE
    $data    = $disbursement->verifyCustomerInfo($accNo, $bankNo);
} catch (GuzzleException|CollectionRequestException|SignFailedException) {
}
```

- Transfer money

```
$disbursement = new Uocnv\BaokimPayment\Clients\Disbursement('production');
$money        = 1000000;
$referenceId  = 'gd_123123';
$memo         = 'chuyen tien';
$accNo        = '21110001400973';
$bankNo       = 970437;
try {
    $response = $disbursement->transferMoney($money, $referenceId, $memo, $accNo, $bankNo);
} catch (GuzzleException|CollectionRequestException|SignFailedException) {
}
```

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Nguyễn Văn Ước](https://github.com/uocnv)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance48

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~1 days

Total

4

Last Release

413d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/480a0f4dde868ba2a563f89ac15e25d9fd1640e9c04360d39cf7eabe51aba74f?d=identicon)[uocnv](/maintainers/uocnv)

---

Top Contributors

[![NguyenUoc98](https://avatars.githubusercontent.com/u/43318488?v=4)](https://github.com/NguyenUoc98 "NguyenUoc98 (35 commits)")

---

Tags

uocnvbaokim-payment

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/uocnv-baokim-payment/health.svg)

```
[![Health](https://phpackages.com/badges/uocnv-baokim-payment/health.svg)](https://phpackages.com/packages/uocnv-baokim-payment)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M672](/packages/laravel-socialite)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)

PHPackages © 2026

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