PHPackages                             pranaycb/laravel-bkash - 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. pranaycb/laravel-bkash

ActiveLibrary[Payment Processing](/categories/payments)

pranaycb/laravel-bkash
======================

A Bkash payment gateway package for Laravel.

V1.0(1y ago)26PHPPHP ^7.4|^8.0|^8.1|^8.2

Since Oct 19Pushed 1y ago1 watchersCompare

[ Source](https://github.com/pranaycb/laravel-bkash)[ Packagist](https://packagist.org/packages/pranaycb/laravel-bkash)[ RSS](/packages/pranaycb-laravel-bkash/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Bkash
=============

[](#laravel-bkash)

A PHP Laravel Package For Bkash Tokenized Payment Gateway

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

[](#installation)

You can install the package using composer. Run below command.

```
composer require pranaycb/laravel-bkash
```

### Publish Config File

[](#publish-config-file)

After successfully installing the package you need to publish the config file. Run this command. This will make a copy of the config file in your application's config directory

```
php artisan vendor:publish --provider="PranayCb\LaravelBkash\BkashServiceProvider" --tag=config
```

### Set .env Variables

[](#set-env-variables)

In your .env file, add the necessary variables:

```
BKASH_ENVIRONMENT=sandbox
BKASH_APP_KEY=your_app_key
BKASH_APP_SECRET=your_app_secret
BKASH_USERNAME=your_username
BKASH_PASSWORD=your_password

```

### Autoloading and Testing

[](#autoloading-and-testing)

Run `composer dump-autoload ` to ensure that Composer recognizes your new package.

### Usage

[](#usage)

You can inject the BkashService into controllers or other services as needed. In your Laravel application, you can use the Bkash service as follows:

```
use PranayCb\LaravelBkash\BkashService;

class PaymentController extends Controller
{
    protected $bkash;

    public function __construct(BkashService $bkash)
    {
        $this->bkash = $bkash;
    }

    /**
     * Create  payment
     */
    public function createPayment(Request $request)
    {
        $paymentData = $request->all(); // Adjust as necessary
        $response = $this->bkash->createPayment($paymentData);

        return response()->json($response); // You will get the bkashURL when request is successful
    }

    /**
     * Execute payment
     */
    public function executePayment(Request $request)
    {
        $paymentID = $request->paymentID;
        $response = $this->bkash->executePayment($paymentID);

        return response()->json($response);
    }

    /**
     * Query payment
     */
    public function queryPayment(Request $request)
    {
        $trxid = $request->trxID;
        $response = $this->bkash->queryPayment($trxid);

        return response()->json($response);
    }
}
```

### Bkash Official Documentation

[](#bkash-official-documentation)

Follow this link  to know details how bkash payment gateway works.

Need Help?
----------

[](#need-help)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

If you have any problem regarding the file please feel free to contact me via email

Happy Coding 🤗🤗

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

570d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d064abc7cae5d566cdf726736f1454de37ee4b725922cd1a55ee2cc052dfae11?d=identicon)[pranaycb](/maintainers/pranaycb)

---

Top Contributors

[![pranaycb](https://avatars.githubusercontent.com/u/65500444?v=4)](https://github.com/pranaycb "pranaycb (6 commits)")

---

Tags

bkashbkash-payment-gatewaybkash-paymentlaravel-bkashlaravel-bkash-paymentpranaycb-bkashpranaycb-laravel-bkash

### Embed Badge

![Health badge](/badges/pranaycb-laravel-bkash/health.svg)

```
[![Health](https://phpackages.com/badges/pranaycb-laravel-bkash/health.svg)](https://phpackages.com/packages/pranaycb-laravel-bkash)
```

###  Alternatives

[karim007/laravel-bkash-tokenize

This is bKash tokenize payment gateway for laravel

2221.1k](/packages/karim007-laravel-bkash-tokenize)[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)

PHPackages © 2026

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