定制 hellofromsteve/hubtel 二次开发

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

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

hellofromsteve/hubtel

最新稳定版本:v1.1.0

Composer 安装命令:

composer require hellofromsteve/hubtel

包简介

A Laravel Package for Hubtel payment integration for laravel 11 and above

README 文档

README

A simple Laravel package for integrating Hubtel payments into your Laravel 11 and Above application.

Installation

composer require hellofromsteve/hubtel

Configuration

Publish the configuration file:

php artisan vendor:publish --tag=hubtel-config

Add your hubtel credentials to your .env file:

HUBTEL_API_KEY=************
HUBTEL_API_SECRET=****************
HUBTEL_MERCHANT_ACCOUNT_ID=**************

# Local Testing Callback
LOCAL_HUBTEL_CALLBACK_URL="(you can use webhook.site to get a url for local testing)"

#Recommended
HUBTEL_CALLBACK_URL="${APP_URL}/payment/callback"
HUBTEL_RETURN_URL="${APP_URL}/payment/return"
HUBTEL_CANCELLED_URL="${APP_URL}/payment/cancel"

You can set the endpoints in the config after publishing there

Usage

Using the Helper Function

// Or use helper function and chain methods directly
hubtel()


$transaction = hubtel()->initialize([
   'totalAmount' => 100,
   'description' => 'payment for service',

]);

// These defaults are set in the initialize() method and then merged to your $payload

// The can be overwritten

 $defaults = [
            'callbackUrl'           => config('hubtel.callback_url'),
            'returnUrl'             => config('hubtel.return_url'),
            'cancellationUrl'       => config('hubtel.cancelled_url'),
            'merchantAccountNumber' => config('hubtel.merchant_account_number'),
            'clientReference'       => (string) \Illuminate\Support\Str::uuid(),
        ];

## Available Methods

- `initialize(array $finalPayload)` - Initiate a payment
- `status(array $payload)` - Get transaction status


## More Methods
More methods will be updated soon



## License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固