承接 jagdish-j-p/billdesk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

jagdish-j-p/billdesk

Composer 安装命令:

composer require jagdish-j-p/billdesk

包简介

Package to integrate BillDesk Payment gateway in Laravel

README 文档

README

Repository has been developed to integrate BillDesk Payment Gateway in Laravel.

This repository is currently in development. There might be some exception.

Installation

You can install the package via composer:

composer require jagdish-j-p/billdesk

Then run the publish command to publish the config files and support controller and view

php artisan billdesk:publish

This will generate the following files

  • The config file with default setup for you to override billdesk.php
  • The controller that will receive payment response and any host-to-host events Http/Controllers/Billdesk/Controller.php
  • The assets in public directory.
  • The view file with default html for you to override payment.blade.php. Note do not change form action URL billdesk.payment.auth.request.

Setups

  1. Add your response urls and your Merchant Id, Security Id and Cheksum Key to the .env file.
BILLDESK_RESPONSE_URL=https://app.test/billdesk/payments/callback
BILLDESK_RESPONSE_PATH=billdesk/payments/callback
BILLDESK_WEBHOOK_URL=https://app.test/billdesk/payments/webhook
BILLDESK_WEBHOOK_PATH=billdesk/payments/webhook

BILLDESK_MERCHANT_ID=
BILLDESK_SECURITY_ID=
BILLDESK_CHECKSUM_KEY=
BILLDESK_UAT_PREFIX="test-prefix"
  1. Run migration to add the transactions table
php artisan migrate

Usage

  1. You can visit http://app.test/billdesk/initiate/payment for the payment flow demo of web integration.

  2. Handle the payment response in Http/Controllers/Billdesk/Controller.php

    /**
     * This will be called after the user approve the payment
     * on the bank side
     *
     * @param Request $request
     * @return Response
     */
    public function callback(Request $request)
    {
        $response = $request->handle();

        if ($response['response_format'] == 'JSON')
            return response()->json(['response' => $response, 'billdesk_response' => $request->all()]);
        dd($response, $request); // Remove this line and modify as per your needs.
        // Update your order status
    }

    /**
     * This will handle any direct call from BillDesk
     *
     * @param Request $request
     * @return string
     */
    public function webhook(Request $request)
    {
        $response = $request->handle();

        // Update your order status

        return 'OK';
    }

	
  1. Check Status of all pending transactions using command
php artisan billdesk:payment-status
  1. Check Status of specific transaction using command pass comma saperated order reference ids.
php artisan billdesk:payment-status reference_id1,reference_id2,reference_id3
  1. Check transaction status from Controller
use JagdishJP/Billdesk/Billdesk;

/**
 * Returns status of transaction
 * 
 * @param string $reference_id reference order id
 * @return array
 */
$status = Billdesk::getTransactionStatus($reference_id);

You can also override payment.blade.php with your custom design to integrate with your layout. but do not change name attribute of html controls and action URL of form.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Contrubuters are welcome and will be given full credit.

Security

If you discover any security related issues, please email jagdish.j.ptl@gmail.com instead of using the issue tracker.

Credits

License

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

Packagify

This package was generated using the Packagify.

jagdish-j-p/billdesk 适用场景与选型建议

jagdish-j-p/billdesk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 329 次下载、GitHub Stars 达 1, 最近一次更新时间为 2021 年 07 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 jagdish-j-p/billdesk 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-17