Download the PHP package programmerhasan/bkash without Composer
On this page you can find all versions of the php package programmerhasan/bkash. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download programmerhasan/bkash
More information about programmerhasan/bkash
Files in programmerhasan/bkash
Package bkash
Short Description Bkash Payment Integration for Laravel
License MIT
Informations about the package bkash
BKash Payment Gateway for Laravel
Welcome to the bKash Laravel Package!
This package allows seamless integration with the bKash payment gateway in Laravel, making transactions quick and hassle-free.
It supports Checkout (URL), Auth & Capture, Refund, and Search Transactions with easy configuration. Built-in automatic grantToken caching (1 hour) ensures full compliance with the latest bKash Tokenized API rules and prevents account lock issues.
โจ Features
- โก Clean and easy to integrate with any Laravel project.
- ๐งช Supports sandbox and production mode for Bkash payments.
- ๐ Supports Auth & Capture for tokenized payments.
- โฉ๏ธ Supports Refunds and Search Transactions.
- โ๏ธ Built-in automatic grantToken caching (1 hour) to comply with bKash Tokenized API rules.
- ๐ฐ Enables creating, executing, and querying payments via Bkash API.
- ๐ Provides payment status verification and transaction history.
- ๐ Enables logging of Bkash payment activities in sandbox mode only.
- ๐ ๏ธ Follows Laravel conventions for service providers and facades.
- ๐งฉ Provides clean helper methods for easy integration into controllers and services.
๐ ๏ธ Requirements
- ๐ PHP: ^7.4 | ^8.0 | ^8.1 | ^8.2
- โก Laravel (illuminate/support): ~6 | ~7 | ~8 | ~9 | ^10 | ^11 | ^12
- ๐ cURL enabled in PHP
- ๐ bKash Merchant Account (sandbox or production)
๐ฆ Installation
โ๏ธ Vendor publish (config)
After publish config file setup your credential. you can see this in your config directory bkash.php file
๐ Set .env configuration
Add your Bkash credentials and environment settings in the .env file:
๐ Enable or Disable bKash Log
You can turn bKash logging on or off. (Only sandbox/testing mode.)
Logs will be saved in the /storage/logs/laravel.log file.
๐ Usage
Publish a route
"bkash.php" Route include in web.php (require 'bkash2.php';)
Publish a controller
You can override the routes
Use route('bkash.payment.create') in blade
Checkout (URL Based)
1. Create Payment
Create payment response
2. Add callback function
Execute payment response
Query payment response
3. Search Transaction
Response
4. Refund Transaction
Response
5. Refund status check
Response
Auth & Capture (URL)
Create Payment
Capture
Void
Required APIs
- Developer Portal (detail Product, workflow, API information): https://developer.bka.sh/docs/checkout-process-overview
- Grant Token : https://developer.bka.sh/v1.2.0-beta/reference#gettokenusingpost
- Create Payment : https://developer.bka.sh/v1.2.0-beta/reference#createpaymentusingpost
- Execute Payment : https://developer.bka.sh/v1.2.0-beta/reference#executepaymentusingpost
- Query Payment : https://developer.bka.sh/v1.2.0-beta/reference#querypaymentusingget
- Search Transaction Details : https://developer.bka.sh/v1.2.0-beta/reference#searchtransactionusingget
Tokenized Checkout (v2) Demo
- Bkash: https://merchantdemo.sandbox.bka.sh/
- Go to https://merchantdemo.sandbox.bka.sh/tokenized-checkout/version/v2
- Wallet Number: 01770618575
- OTP: 123456
- Pin: 12121
License
This repository is licensed under the MIT License.
Copyright 2025 ProgrammerHasan.