iamtiqbal/bkash-php-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  • 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

  1. Download or clone this repository:
    git clone https://github.com/IamTIqbal/bkash-php-sdk.git
    
  2. Copy the src/ folder into your project.
  3. (For Laravel) Copy config/bkash.php to your config directory.
  4. (For plain PHP) Copy examples/php-config.php and update with your credentials.
  5. Require the classes in your code:
    require_once '/path/to/src/BkashClient.php';
  6. 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

  1. Customer initiates checkout
  2. SDK authenticates and creates payment
  3. Customer is redirected to bKash
  4. bKash redirects to your callback URL
  5. 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 iamtiqbal/bkash-php-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 40
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-18