heleket/php-sdk 问题修复 & 功能扩展

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

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

heleket/php-sdk

Composer 安装命令:

composer require heleket/php-sdk

包简介

Official PHP SDK for the Heleket cryptocurrency payment API: payments, payouts, balance, exchange rates, and signed webhooks. Zero runtime dependencies.

README 文档

README

Packagist Version Total Downloads License CI

The official PHP SDK for the Heleket cryptocurrency payment API. Covers the full documented surface (payments, payouts, balance, services, exchange rates), ships with unit tests, runnable examples, a debug mode, a webhook inspector CLI, and a Docker harness.

Built to be copied or composer require'd directly into your project. Zero runtime dependencies — only ext-curl and ext-json (bundled with PHP).

Quickstart

require __DIR__ . '/vendor/autoload.php';

use Heleket\Client;

$payment = Client::payment($paymentApiKey, $merchantId);

$invoice = $payment->createInvoice([
    'amount'   => '15.00',
    'currency' => 'USD',
    'order_id' => 'order-42',
]);

echo $invoice['url']; // → https://pay.heleket.com/pay/<uuid>

Install

composer require heleket/php-sdk

…or clone this folder into your project and add it to your autoloader.

Requirements: PHP 7.4+, ext-curl, ext-json. For new deployments, target PHP 8.2+ — 7.4 is end-of-life. The bundled Docker image uses PHP 8.3.

Documentation

Full reference lives in docs/:

What's in the box

src/         Production code — zero dependencies beyond ext-curl, ext-json
tests/       PHPUnit unit tests + FakeTransport for offline testing
examples/    Twelve runnable scripts (01..12) demonstrating every endpoint
bin/         heleket-webhook-inspect — CLI to verify and dump any webhook payload
docker/      php:7.4-cli-alpine with Composer baked in
docs/        Full module documentation in English

Common tasks

make install              # Composer install
make test                 # PHPUnit
make stan                 # PHPStan level 8
make qa                   # All quality gates
make example-invoice      # Create a real invoice (needs .env)
make example-webhook      # Run the webhook listener on :8000
make docker-shell         # Drop into a containerized PHP 7.4 shell
make help                 # Full target list

Security notes (read this)

  • Always verify webhook signatures. See docs/06-webhooks.md. Never trust the payload otherwise.
  • Whitelist Heleket's webhook source IP 31.133.220.8 at your firewall or reverse proxy.
  • Never log raw API keys — the debug dumper logs only the request method, URL, and body (never headers), but a misconfigured logger wrapping the SDK can still capture credentials.
  • Two separate API keys — payments and payouts. Don't mix them up; webhooks of the wrong kind will fail verification. (One exception: /v1/payment/refund uses the payout key — call PayoutClient::refund().)

Releasing

Versions are published to Packagist automatically from git tags on github.com/Heleket/php-sdk (the Packagist ↔ GitHub webhook is already wired up).

  1. Land changes on main; make sure make qa is green.
  2. Update CHANGELOG.md.
  3. Tag and push: git tag 2.1.0 && git push origin 2.1.0.

Packagist picks up the new tag within a minute. The version reported in the User-Agent header is read from Composer at runtime, so there is nothing else to bump.

Major versions: the 1.x line lives on the 1.x branch (tag 1.0.0) and must keep working — never delete or move old tags. See UPGRADING.md for the 1.x → 2.x migration guide.

License

MIT — see LICENSE.

heleket/php-sdk 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-30