parsecvpn/heleket-laravel-integrate 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

parsecvpn/heleket-laravel-integrate

Composer 安装命令:

composer require parsecvpn/heleket-laravel-integrate

包简介

Laravel package for heleket.com

README 文档

README

The free Laravel package to help you integrate payment with heleket.com

Use Cases

  • Create a payment link with heleket.com
  • Parse result from heleket.com
  • Example webhook

Features

  • Dynamic heleket.com credentials from config/heleket.php
  • Easy to create payment link with a simple line code

Requirements

  • PHP: 8.1 or higher
  • Laravel 9.0 or higher

Quick Start

If you prefer to install this package into your own Laravel application, please follow the installation steps below

Installation

Step 1. Install a Laravel project if you don't have one already

https://laravel.com/docs/installation

Step 2. Require the current package using composer:

composer require parsecvpn/heleket-laravel-integrate

Step 3. Publish the controller file and config file

php artisan vendor:publish --provider="Parsecvpn\Heleket\HeleketServiceProvider" --tag="heleket"

If publishing files fails, please create corresponding files at the path config/heleket.php and app\Http\Controllers\HeleketControllers.php from this package. And you can also further customize the HeleketControllers.php file to suit your project.

Step 4. Update the various config settings in the published config file:

After publishing the package assets a configuration file will be located at config/heleket.php. Please contact heleket.com to get those values to fill into the config file.

Step 5. Add middleware protection:

app/Http/Kernel.php
<?php

namespace App\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
    // Other kernel properties...
    
    /**
     * The application's route middleware groups.
     *
     * @var array
     */
    protected $routeMiddleware = [
        // Other middlewares...
         'heleket' => 'App\Http\Middleware\HeleketMiddleware',
    ];
}

Step 6. Add route:

routes/api.php
<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\HeleketController;

// Other routes properties...

Route::group(['middleware' => ['heleket']], function () {
    Route::post('/heleket/webhook', [HeleketController::class, 'webhook']);
});

}

Then your IPN (Webhook) URL will be something like https://yourdomain.ltd/api/heleket/webhook, and you should provide it to Heleket's account setting. You could provide it to routes/web.php if you want but remember that Heleket will check for referer matched with the pre-registration URL. So make sure that you provide them the right URL of website.

Testing

<?php

namespace App\Console\Commands;

use Parsecvpn\Heleket\HeleketSdk;
use Illuminate\Console\Command;

class HeleketTestCommand extends Command
{
    protected $signature = 'heleket:test';

    protected $description = 'Test Heleket SDK';

    public function __construct()
    {
        parent::__construct();
    }

    public function handle()
    {
        $instance = new HeleketSdk();
        echo $instance->create_payment(
            'INV-test-01',
            100,
            'USDT',
            'BSC',
            'INV-test-01',
            'https://yourdomain.ltd/invoices/INV-test-01',
            'https://yourdomain.ltd/invoices/INV-test-01',
            'https://yourdomain.ltd/invoices/INV-test-01?success=true' // Remember that param success=true or any similar is just for toast notification, do not put any logical process here
        );
    }
}

Feedback

Respect us in the Laravel Việt Nam

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email contact@funnydev.vn or use the issue tracker.

Credits

License

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

parsecvpn/heleket-laravel-integrate 适用场景与选型建议

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

它主要适用于以下技术方向: 「package」 「payment」 「crypto」 「laravel」 「bitcoin」 「litecoin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 parsecvpn/heleket-laravel-integrate 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-16