PHPackages                             ledc/xhdpay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. ledc/xhdpay

ActiveLibrary[Payment Processing](/categories/payments)

ledc/xhdpay
===========

小红点支付（易生支付）

v7.0.2(1y ago)07MITPHPPHP &gt;=7.4

Since Oct 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ledccn/ledc-xhdpay)[ Packagist](https://packagist.org/packages/ledc/xhdpay)[ RSS](/packages/ledc-xhdpay/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

红小点支付（易生支付）
===========

[](#红小点支付易生支付)

安装
--

[](#安装)

`composer require ledc/xhdpay`

使用
--

[](#使用)

开箱即用，只需要传入一个配置，初始化一个实例即可：

```
use Ledc\XhdPay\Config;
use Ledc\XhdPay\XhdPay;

$env_config = [
    'merchantNo' => '联合商户号',
    'terminalNo' => '联合设备号',
    'secretKey' => '密钥',
    'enable' => '启用支付',
    'debug' => '启用测试环境',
    'notifyUrlPrefix' => '通知地址前缀，格式如：https://iyuu.cn/xhdpay/callback',
];
$config = new Config($env_config);
$api = new XhdPay($config);
```

在创建实例后，所有的方法都可以有IDE自动补全；例如：

```
// 获得完整的通知URL地址
$notifyUrl = $config->getPayNotifyUrl($attach);

// 验证签名（签名验证失败时，会抛出异常）
$config->verifySignature();

// 统一支付下单
$api->pay();

// 交易订单(退款)查询二合一接口
$api->query();

// 交易退款接口
$api->refund();
```

捐赠
--

[](#捐赠)

[![reward](reward.png)](reward.png)

支付成功回调报文
--------

[](#支付成功回调报文)

```
{
  "biz": {
    "terminalNo": "联合设备号",
    "orderNo": "网关订单号",
    "merOrderNo": "商户订单号",
    "bankCardType": "U",
    "channelOrderNo": "渠道订单号（微信、支付宝...）",
    "paidInfo": {
      "billTime": "2024-10-23 16:13:54",
      "bankCardType": "U",
      "paidTime": "2024-10-23 16:13:54",
      "buyerId": "用户openid",
      "paidAmount": "1"
    },
    "buyerId": "用户openid",
    "payableAmount": "1",
    "orderAmount": "1",
    "orderTime": "2024-10-23 16:13:47",
    "notifyType": "Paid",
    "orderDesc": "ISG--ISG BioSkin 賦活奇....",
    "merchantNo": "联合商户号",
    "status": "Completed"
  },
  "success": 1,
  "sign": "32bd0227b2bb76c4d7260e048d4f11dd"
}
```

退款成功回调报文
--------

[](#退款成功回调报文)

```
{
  "biz": {
    "terminalNo": "联合设备号",
    "orderNo": "网关订单号",
    "merOrderNo": "商户订单号",
    "bankCardType": "U",
    "channelOrderNo": "渠道退款订单号（微信、支付宝...）",
    "buyerId": "用户openid",
    "payableAmount": "1",
    "orderAmount": "1",
    "orderTime": "2024-10-23 17:33:42",
    "notifyType": "Refund",
    "refundInfo": {
      "refundOrderNo": "网关退货订单号",
      "refundTime": "2024-10-28 11:56:52",
      "refundStatus": "Success",
      "merRefundOrderNo": "商户退货订单号",
      "refundAmount": "1"
    },
    "orderDesc": "ISG--ISG BioSkin 賦活奇....",
    "merchantNo": "联合商户号",
    "status": "Closed"
  },
  "success": 1,
  "sign": "d6b3a75c949cdd4cd73e9738b0c6fd3c"
}
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

3

Last Release

567d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4af14254189bc74029cc40f4206f8006872b0cd092c680201f204a85a490f143?d=identicon)[ledccn](/maintainers/ledccn)

---

Top Contributors

[![ledccn](https://avatars.githubusercontent.com/u/53997080?v=4)](https://github.com/ledccn "ledccn (5 commits)")

### Embed Badge

![Health badge](/badges/ledc-xhdpay/health.svg)

```
[![Health](https://phpackages.com/badges/ledc-xhdpay/health.svg)](https://phpackages.com/packages/ledc-xhdpay)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
