iamtiqbal/bkash-php-sdk
Composer 安装命令:
composer require iamtiqbal/bkash-php-sdk
包简介
Unofficial PHP SDK and Laravel package for integrating bKash payment gateway in Bangladesh.
README 文档
README
⚠️ Disclaimer
This is an unofficial community-driven integration for bKash Tokenized Checkout.
This project is not affiliated with or endorsed by bKash or Bangladesh Bank.
Developer: Tamim Iqbal — IT Manager & AI Developer
A PHP SDK and Laravel package for bKash Tokenized Checkout (Bangladesh). Easily integrate bKash payments in any PHP or Laravel application.
Table of Contents
- Features
- Requirements
- Installation
- Quick Start
- API Reference
- Payment Flow
- Status Codes
- Gotchas & Troubleshooting
- Security Notes
- Testing
- License
Features
- Unofficial bKash gateway for PHP & Laravel
- Secure API communication with bKash Tokenized Checkout
- Redirect-based payment flow with callback handling
- Example usage for both plain PHP and Laravel
Requirements
- PHP 7.4+ with cURL enabled
- For Laravel: Laravel 8+ (recommended)
Installation
Composer
composer require iamtiqbal/bkash-php-sdk
Manual Installation
- Download or clone this repository:
git clone https://github.com/IamTIqbal/bkash-php-sdk.git - Copy the
src/folder into your project. - (For Laravel) Copy
config/bkash.phpto your config directory. - (For plain PHP) Copy
examples/php-config.phpand update with your credentials. - Require the classes in your code:
require_once '/path/to/src/BkashClient.php';
- Follow the usage examples in the README or
examples/folder.
Quick Start
- Configure your credentials (see config/bkash.php or examples/php-config.php)
- Initiate a payment using the SDK
- Redirect user to bKash
- Handle callback for payment confirmation
API Reference
Authentication
Authenticate using your bKash Tokenized Checkout credentials. See BkashClient::getIdToken().
Initiate Payment
Create a payment and get the redirect URL. See BkashClient::createPayment().
Handle Callback
Handle the callback from bKash and execute the payment. See BkashClient::executePayment().
Check Transaction Status
Handled by executePayment during callback. Inspect the returned data for transaction status.
Utilities
- Invoice generation (see examples)
- Payment metadata (extend as needed)
Payment Flow
- Customer initiates checkout
- SDK authenticates and creates payment
- Customer is redirected to bKash
- bKash redirects to your callback URL
- SDK executes payment and confirms status
Status Codes
Completed= Success- Other = Failed/Cancelled
Gotchas & Troubleshooting
- Store currency must be BDT
- Use correct credentials (test vs production)
- Ensure SSL is enabled for callback URL
Security Notes
- Never hardcode credentials in code
- Use HTTPS for all callbacks and checkout pages
Testing
- Use bKash sandbox credentials for testing
- Test full payment flow (initiate, redirect, callback)
License
MIT License. See LICENSE file for details.
iamtiqbal/bkash-php-sdk 适用场景与选型建议
iamtiqbal/bkash-php-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 iamtiqbal/bkash-php-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 iamtiqbal/bkash-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 40
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-18