PHPackages                             ledc/hanlian - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ledc/hanlian

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ledc/hanlian
============

汉连跨境ERP系统对接SDK

v7.0.4(1y ago)06MITPHPPHP &gt;=7.4

Since Oct 9Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (6)Used By (0)

汉连跨境ERP系统对接SDK
==============

[](#汉连跨境erp系统对接sdk)

安装
--

[](#安装)

`composer require ledc/hanlian`

使用
--

[](#使用)

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

```
use Ledc\HanLian\Config;
use Ledc\HanLian\MerchantApi;

$env_config = [
    'use_test' => true,
    'api_host' => Config::API_HOST_TEST, // 服务器地址
    'app_key' => Config::APP_KEY, // 测试环境或正式环境的appKey
    'app_secret' => Config::APP_SECRET, // 测试环境或正式环境的appSecret
    'warehouse_no' => Config::WARE_HOUSE_NO // 测试环境或正式环境的仓库编码
];
$config = new Config($env_config);
$api = new MerchantApi($config);
```

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

```
//新增销售单
$api->createOrder();
//销售单审核
$api->verifyOrder();
//分销商授权库存查询
$api->searchWarehouse();
//查询销售单
$api->queryOrder();
//查询报关状态单
$api->customsStatus();
//报关状态回执（适用于商家自行报关的客户）
$api->updateCustoms();
```

二次开发
----

[](#二次开发)

配置类：`Ledc\HanLian\Config`

HTTP请求客户端基础类：`Ledc\HanLian\HttpClient`

API客户端：`Ledc\HanLian\MerchantApi`

响应类：`Ledc\HanLian\HttpResponse`

你可以继承以上几个类，扩展您需要的功能。

捐赠
--

[](#捐赠)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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 ~10 days

Total

5

Last Release

537d 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 (7 commits)")

### Embed Badge

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

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

###  Alternatives

[topthink/think-captcha

captcha package for thinkphp

132934.4k68](/packages/topthink-think-captcha)[topthink/think-worker

workerman extend for thinkphp

202227.2k9](/packages/topthink-think-worker)[yunwuxin/think-cron

计划任务

17416.2k](/packages/yunwuxin-think-cron)[zzstudio/think-addons

The ThinkPHP6 Addons Package

1518.6k](/packages/zzstudio-think-addons)[topthink/think-annotation

Annotation For ThinkPHP

4831.5k8](/packages/topthink-think-annotation)[liliuwei/thinkphp-jump

适用于thinkphp6.0的跳转扩展

2874.4k1](/packages/liliuwei-thinkphp-jump)

PHPackages © 2026

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