定制 izichangepay/sdk 二次开发

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

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

izichangepay/sdk

最新稳定版本:v0.1.0

Composer 安装命令:

composer require izichangepay/sdk

包简介

Official PHP SDK for the IzichangePay API.

README 文档

README

Official PHP SDK for the IzichangePay API. PHP ≥ 7.4, only ext-curl + ext-json.

composer require izichangepay/sdk

Usage

<?php
use Izichangepay\Client;
use Izichangepay\Http;

$izipay = new Client(getenv('IZIPAY_API_KEY'));
// Sandbox: new Client(getenv('IZIPAY_API_KEY'), Http::SANDBOX_BASE_URL);

$intent = $izipay->paymentIntents->create([
    'requestedCurrencyType' => 'fiat',
    'currencyRequested'     => 'XOF',
    'amountRequested'       => '10000',
    'acceptedCoins'         => ['USDT.TRC20'],
]);
echo $intent['paymentUrl'];

Pagination

foreach ($izipay->paymentIntents->iterate(['limit' => 50]) as $intent) {
    echo $intent['id'], PHP_EOL;
}

Verifying a webhook

<?php
use Izichangepay\Webhooks;
use Izichangepay\WebhookException;

$rawBody = file_get_contents('php://input'); // raw body, not a parsed array
try {
    $event = Webhooks::validate(
        $rawBody,
        $_SERVER['HTTP_X_IZIPAY_SIGNATURE'] ?? null,
        getenv('IZIPAY_WEBHOOK_SECRET')
    );
    // handle $event['type'] / $event['data']
    http_response_code(200);
} catch (WebhookException $e) {
    http_response_code(400); // reject: $e->reason
}

Errors

All exceptions extend Izichangepay\IzichangepayException. Specific types: AuthException (401/403), NotFoundException (404), ValidationException (422, ->fields), RateLimitException (429, ->retryAfter), ServerException (5xx), NetworkException, WebhookException.

Features

  • Bearer auth, auto JSON (de)serialization
  • Auto Idempotency-Key on POST, retry on 429/5xx/network with backoff + jitter
  • Constant-time webhook signature verification + anti-replay window
  • Cursor pagination iterators

Documentation

Full reference: https://docs.pay.izichange.com/developers/sdks/php

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固