定制 durrbar/payment-bkash-driver 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

durrbar/payment-bkash-driver

Composer 安装命令:

composer require durrbar/payment-bkash-driver

包简介

A Laravel package to integrate the bKash Payment Gateway with the durrbar/payment-module.

README 文档

README

bKash Payment Driver for Laravel

Latest Version on Packagist Total Downloads

A Laravel package to integrate the bKash Payment Gateway seamlessly into your application. This package supports tokenized payments, refunds, transaction verification, and handling callbacks (IPN, success, failure, cancel). It is designed to work with the durrbar/payment-module for shared payment driver functionality.

Features

  • Tokenized Payments: Supports secure tokenized payment flows.
  • Refunds: Initiate and check the status of refunds.
  • Transaction Verification: Verify payment transactions using transaction IDs.
  • Callback Handling: Handle IPN, success, failure, and cancellation callbacks.
  • Sandbox Support: Easily switch between sandbox and live environments for testing.
  • Queue Integration: Automatically retry refund status checks using queued jobs.

Requirements

  • PHP >= 8.0
  • Laravel >= 9.0
  • durrbar/payment-module (for shared payment driver functionality)

Installation

Install the package via Composer:

composer require durrbar/payment-bkash-driver

Configuration

Add the following variables to your .env file:

BKASH_SANDBOX=true
BKASH_APP_KEY=your_app_key
BKASH_APP_SECRET=your_app_secret
BKASH_USERNAME=your_username
BKASH_PASSWORD=your_password
BKASH_CALLBACK_URL=https://your-domain.com/bkash/callback

The configuration will automatically load from payment.providers.bkash in your Laravel application.

Usage

This package is designed to work seamlessly with the PaymentService from the durrbar/payment-module. All payment-related operations are handled automatically by the PaymentService. Simply configure the package and specify bkash as the provider when interacting with the PaymentService.

How It Works

  1. Install the package and configure the .env file with your bKash credentials.
  2. The PaymentService dynamically resolves this package as the driver for bKash payments.
  3. All payment-related operations (initiating payments, handling callbacks, refunds, etc.) are handled automatically by the PaymentService.

No additional setup or manual integration is required beyond installing the package and adding the configuration.

Supported Operations

The following operations are supported and handled automatically by the PaymentService:

  • Initiating a Payment: Payments are initiated using the bKash API.
  • Handling Callbacks: IPN, success, failure, and cancellation callbacks are processed automatically.
  • Verifying a Payment: Payment transactions are verified using transaction IDs.
  • Refunding a Payment: Refunds can be initiated and their status checked automatically.
  • Checking Refund Status: The PaymentService checks the status of refunds using queued jobs.

Queue Jobs

The package includes a queued job (CheckBkashRefundStatusJob) to automatically check the status of refunds after 30 seconds. Ensure your queue worker is running:

php artisan queue:work

Testing

To test the package in sandbox mode, set BKASH_SANDBOX=true in your .env file. Use the sandbox credentials provided by bKash.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix.
  3. Submit a pull request with a detailed description of your changes.

Security

If you discover any security-related issues, please email the maintainer instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

durrbar/payment-bkash-driver 适用场景与选型建议

durrbar/payment-bkash-driver 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 durrbar/payment-bkash-driver 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 durrbar/payment-bkash-driver 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-07