定制 whagency/finova-pay-php-sdk 二次开发

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

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

whagency/finova-pay-php-sdk

最新稳定版本:v1.0.2

Composer 安装命令:

composer require whagency/finova-pay-php-sdk

包简介

Finova Pay SDK

README 文档

README

A PHP SDK for interacting with the Finova Pay API.

Latest Stable Version License

Installation

The preferred way to install this package is via composer.

Either run

composer require whagency/finova-pay-php-sdk

or add to your composer.json file

"require": {
    "whagency/finova-pay-php-sdk": "^1.0"
},

Configuration

You need API credentials to use this SDK:

  • API Public Key
  • API Private Key
  • API Webhook Key

You can obtain them from your Finova merchant dashboard.

Examples

Get started

use Finova\Pay\FinovaPay;

$client = new FinovaPay('API_PUBLIC_KEY', 'API_PRIVATE_KEY');

Create a new merchant order

$response = $client->createOrder([
    'externalOrderId' => '51',
    'assetCode' => 'USDT',
    'amount' => '125.50',
    'title' => 'Demo order',
    'description' => 'Order created from PHP SDK',
    'expiresInSeconds' => 900,
    'successUrl' => 'https://merchant.example/success',
    'pendingUrl' => 'https://merchant.example/pending',
    'failUrl' => 'https://merchant.example/fail',
]);

Get an existing order by ID

$response = $client->getOrder('MERCHANT_ORDER_ID');

Cancel an existing active order by ID

$response = $client->cancelOrder('MERCHANT_ORDER_ID');

Receiving a POST callback

Checks the validity of the received request signature

if (FinovaPay::isValidWebhookSignature($body, $headers, 'API_WEBHOOK_KEY')) {

}

Callback BODY data example

{
    "id": "17",
    "event": "payment.succeeded",
    "createdAt": "2026-05-02T09:47:16Z",
    "data": {
        "settlementReleasedAt": "2026-05-02T09:47:16Z",
        "amount": 10,
        "status": "succeeded",
        "feeAmount": 1.4285714,
        "merchantId": "3a5bcad9-dc38-4565-9286-33925351b16e",
        "occurredAt": "2026-05-02T09:47:16Z",
        "merchantOrderId": "19",
        "settlementStatus": "released",
        "settlementHoldDays": 0,
        "orderId": "23f1beae-7ab5-4ace-8df9-76f1cb9fdbc5",
        "assetCode": "USDT",
        "externalOrderId": "19",
        "settlementReleaseAt": "2026-05-02T09:47:16Z"
    }
}

Callback HEADERS data example

{
    "Content-Type": "application/json",
    "X-Webhook-Id": "17",
    "X-Webhook-Event": "payment.succeeded",
    "X-Webhook-Timestamp": "1777715236",
    "X-Webhook-Signature": "sha256=bfa9fca98b83104d284f2bfa27ab531f4ec66d073c4cab7e0afd9fcc151db601",
}

License

This project is licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固