pranaycb/laravel-bkash
Composer 安装命令:
composer require pranaycb/laravel-bkash
包简介
A Bkash payment gateway package for Laravel.
关键字:
README 文档
README
A PHP Laravel Package For Bkash Tokenized Payment Gateway
Installation
You can install the package using composer. Run below command.
composer require pranaycb/laravel-bkash
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
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
Run composer dump-autoload to ensure that Composer recognizes your new package.
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
Follow this link https://developer.bka.sh/docs/tokenized-checkout-process to know details how bkash payment gateway works.
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 pranaycb.ctg@gmail.com
Happy Coding 🤗🤗
License
pranaycb/laravel-bkash 适用场景与选型建议
pranaycb/laravel-bkash 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 10 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「bkash」 「bkash-payment-gateway」 「bkash-payment」 「laravel-bkash」 「laravel-bkash-payment」 「pranaycb-bkash」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pranaycb/laravel-bkash 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pranaycb/laravel-bkash 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pranaycb/laravel-bkash 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This is bKash tokenize payment gateway for laravel
This is bKash payment gateway for laravel
Bkash Payment Integration for Laravel.
bkash payment gateway for Laravel v.1
Laravel Bkash payment gateway for Bangladesh bKash a mobile payment service.
A PHP library for integrating with the bKash payment gateway
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-10-18