tipusultan/laravel-bkash
Composer 安装命令:
composer require tipusultan/laravel-bkash
包简介
A Laravel package for bKash payment integration
README 文档
README
A simple and efficient bKash Payment Gateway integration package for Laravel 10 & 11.
Features
- Easy bKash Payment Integration
- Supports both Sandbox & Live Mode
- Handles Refunds & Callbacks
- Compatible with Laravel 10 & 11
Installation
1. Install Package
composer require tipusultan/laravel-bkash
2. Publish Package Files
php artisan vendor:publish --provider="Tipusultan\Bkash\BkashServiceProvider"
Or publish individual components
# Publish config file php artisan vendor:publish --tag=bkash-config # Publish views php artisan vendor:publish --tag=bkash-views # Publish controller php artisan vendor:publish --tag=bkash-controller # Publish service php artisan vendor:publish --tag=bkash-service
3. Configure Environment Variables
Add these to your .env file:
SANDBOX=true BKASH_USERNAME='your_username' BKASH_PASSWORD='your_password' BKASH_APP_KEY='your_app_key' BKASH_APP_SECRET='your_app_secret'
Package Structure
📂 Laravel Project
├── 📂 resources
│ └── 📂 views/bkash
│ ├── pay.blade.php
│ ├── success.blade.php
│ ├── fail.blade.php
│ ├── refund.blade.php
├── 📂 app
│ ├── 📂 Http/Controllers/Bkash
│ └── 📂 Services/Bkash
├── 📂 routes
│ └── bkash.php
├── 📂 config
│ └── bkash.php
Usage
Payment Routes
Route::get('/bkash', [BkashController::class, 'payment'])->name('url-pay'); Route::post('/bkash/create', [BkashController::class, 'createPayment'])->name('url-create'); Route::get('/bkash/callback', [BkashController::class, 'callback'])->name('url-callback');
Refund Routes
Route::get('/bkash/refund', [BkashController::class, 'getRefund'])->name('url-get-refund'); Route::post('/bkash/refund', [BkashController::class, 'refundPayment'])->name('url-post-refund');
Available Routes
| Method | URI | Action | Route Name |
|---|---|---|---|
| GET | /bkash | Show payment form | url-pay |
| POST | /bkash/create | Create payment | url-create |
| GET | /bkash/callback | Handle callback | url-callback |
| GET | /bkash/refund | Show refund form | url-get-refund |
| POST | /bkash/refund | Process refund | url-post-refund |
Available Views
| View | Path |
|---|---|
| Payment Form | resources/views/bkash/pay.blade.php |
| Success Page | resources/views/bkash/success.blade.php |
| Failure Page | resources/views/bkash/fail.blade.php |
| Refund Form | resources/views/bkash/refund.blade.php |
Important Notice
⚠️ This bKash Payment Gateway package is for educational & testing purposes only. Before using it in production, thoroughly test all features and report any issues.
Contributing
Found a bug? Open an issue in the GitHub repository. Contributions are welcome! Feel free to submit pull requests.
License
This package is licensed under the MIT License.
🌟 If you find this package helpful, please star this repository!
tipusultan/laravel-bkash 适用场景与选型建议
tipusultan/laravel-bkash 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 tipusultan/laravel-bkash 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tipusultan/laravel-bkash 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-02-21