PHPackages                             thebikramlama/hbl - 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. thebikramlama/hbl

ActivePackage[Payment Processing](/categories/payments)

thebikramlama/hbl
=================

HBL Payment Integration - Laravel Package

v1.0.1(6y ago)101574MITBlade

Since Mar 9Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/TheBikramLama/hbl)[ Packagist](https://packagist.org/packages/thebikramlama/hbl)[ GitHub Sponsors](https://github.com/TheBikramLama)[ RSS](/packages/thebikramlama-hbl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

NO LONGER WORKING
=================

[](#no-longer-working)

Please note this package is no longer working.
Please check the demo for new integration: [Demo](https://hbl-sandbox.rupi.co/)
Please contact me at:  or call me at 9808134818 for new integration.

Himalayan Bank Payment Integration - Laravel Package

[![Latest Version](https://camo.githubusercontent.com/093533263539141078a108080ecb9815d685b9f64fb5cd634b0339b8a8079efe/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f54686542696b72616d4c616d612f68626c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/TheBikramLama/hbl/releases)[![Issues](https://camo.githubusercontent.com/5a56b6906b0700788d3c74fcc66d1bf2621b1500b4194a078db0d09ef1213efa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f54686542696b72616d4c616d612f68626c)](https://camo.githubusercontent.com/5a56b6906b0700788d3c74fcc66d1bf2621b1500b4194a078db0d09ef1213efa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f54686542696b72616d4c616d612f68626c)[![Downloads](https://camo.githubusercontent.com/213b9ec0eb96f3eec372ccb0f0492268ad944f6b1a399df431c4e63716686b5f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f54686542696b72616d4c616d612f68626c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/thebikramlama/hbl)

HBL Laravel Package can be used to generate himalayan bank payment requests.

Getting Started
---------------

[](#getting-started)

This package can be installed through Composer.

```
composer require thebikramlama/hbl
```

Publish `hbl.php` config file for configuration

```
php artisan vendor:publish --provider="Thebikramlama\Hbl\HblServiceProvider"
```

Configuration
-------------

[](#configuration)

Edit the configuration file in `config/hbl.php`

```
"merchantId" => "987654321", // Merchant ID provided by Himalayan Bank
"secretKey" => "abcdef0987654321", // Secrect Key associated with the Merchant ID

"currencyCode" => "NPR", // Currency type: USD, NPR
"nonSecure" => "Y", // Option for OTP authentication Y/N, Y means disable authentication

"methodUrl" => "https://hblpgw.2c2p.com/HBLPGW/Payment/Payment/Payment", // Only update URL if needed
"clickContinue" => false, // Click to continue for Payment Page redirection true/false
"redirectWait" => 1500, // Redirect wait time in miliseconds, set 0 for no wait time
```

Making a Payment Request
------------------------

[](#making-a-payment-request)

After the installation is complete, `Hbl` alias is generated by default.

### Using the default Alias

[](#using-the-default-alias)

```
// Using Default Alias
use Hbl;
```

### Creating a payment request

[](#creating-a-payment-request)

Syntax for creating a payment request

```
Hbl::payment($amount, $identifier, $description, $userDefinedValuesArr, $merchantID, $merchantSecret, $currencyCode, $nonSecure);
```

#### Fields

[](#fields)

- `$amount` (integer, required): Amount to be paid
- `$identifier` (integer, optional): Unique identifier used for invoicing. (Can be order ID)
- `$description` (text, optional): Description text to display on payment page/invoice.
- `$userDefinedValuesArr` (array, optional): Custom values to be sent and receive as postback. (Eg: verification data)
- `$merchantID` (optional): Custom merchant other than config file, use this argument if you intend to use multiple accounts for payment.
- `$merchantSecret` (optional): Use the secret key related to the custom **merchantID**
- `$currencyCode` (optional): Use this argument if you intend to use multiple Currency payments. Available options: "NPR", "USD"
- `$nonSecure` (optional): Use this argument to enable/disable OTP authentication. Available options: "Y", "N" (Y means disable)

#### Examples

[](#examples)

Example with just amount

```
$amount = 250;
Hbl::payment($amount); // This will create and redirect to the payment page of Rs/$ 250
```

Example with more arguments

```
// $booking is a dynamic collection
$amount = $booking->amount;
$identifier = $booking->id;
$description = "Booking Payment.";
$userDefinedValues = [
  "bookingUser" => $booking->user,
  "paymentHash" => md5($amount.'MySecretSalt') // To use the hash to verify pament later
];

// Make a payment request
Hbl::payment($amount, $identifier, $description, $userDefinedValues);
```

Example with full arguments

```
// $booking is a dynamic collection
$amount = $booking->amount;
$identifier = $booking->id;
$description = "Booking Payment.";
$userDefinedValues = [
  "bookingUser" => $booking->user,
  "paymentHash" => md5($amount.'MySecretSalt') // To use the hash to verify pament later
];

// Custom Merchant
$merchantID = "123456789";
$merchantSecret = "abcdef1234567890";
$currencyCode = "USD";
$nonSecure = "N";

// Make a payment request
Hbl::payment($amount, $identifier, $description, $userDefinedValues, $merchantID, $merchantSecret, $currencyCode, $nonSecure);

// This code will generate a payment page with custom merchant, Currency in US Dollars and Enable OTP authentication
```

Important Notes
---------------

[](#important-notes)

- Route names: `hbl.index`, `hbl.error` are created by the package, please do not override.
- Custom Views: Create custom views folder under `resources/views/vendor/hbl/`, copy the original view files from: `vendor/thebikramlama/hbl/src/views/`

Credits
-------

[](#credits)

- [Bikram Lama](https://github.com/TheBikramLama)

License
-------

[](#license)

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

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance51

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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 ~5 days

Total

2

Last Release

2246d ago

Major Versions

v0.0.1 → v1.0.12020-03-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c05a364e18151394af73ae4905653a0072e4980ce6583c3fb634d55ad494929?d=identicon)[TheBikramLama](/maintainers/TheBikramLama)

---

Top Contributors

[![TheBikramLama](https://avatars.githubusercontent.com/u/47409497?v=4)](https://github.com/TheBikramLama "TheBikramLama (20 commits)")

---

Tags

hblhbl-integrationhbl-laravelhimalayan-bankhimalayan-bank-integrationhimalayan-bank-laravellaravelnepalpayment-gatewaypayment-integrationphp

### Embed Badge

![Health badge](/badges/thebikramlama-hbl/health.svg)

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

###  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)
