PHPackages                             ledc/intra-city - 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. ledc/intra-city

ActiveLibrary

ledc/intra-city
===============

微信同城配送

v7.0.8(11mo ago)28321MITPHPPHP &gt;=7.4

Since Aug 14Pushed 11mo ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (9)Used By (1)

说明
==

[](#说明)

安装
--

[](#安装)

`composer require ledc/intra-city`

使用说明
----

[](#使用说明)

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

```
use Ledc\IntraCity\Config;
use Ledc\IntraCity\ExpressApi;

//更多配置项，可以查看 配置管理类的属性 Ledc\IntraCity\Config
$config = [
    'appid' => '',
    'token' => '',
    'access_token' => function (string $appid) use ($miniProgramAccessToken) {
          return $miniProgramAccessToken->getToken();
     },
    'aes_sn' => '',
    'aes_key' => '',
    'rsa_sn' => '',
    'rsa_public_key' => '',
    'rsa_private_key' => '',
    'cert_sn' => '',
    'cert_key' => '',
    'callback_url' => '',
    'wx_store_id' => '',
    'order_detail_path' => '',
    'enable' => true,
    'use_sandbox' => true,
];

$api = new ExpressApi(new Config($config));
```

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

```
//开通门店权限（无加密，可直接调用）
$api->apply();

//创建门店
$api->createStore();

//查询门店
$api->queryStore();

//更新门店
$api->updateStore();

//门店运费充值
$api->storeCharge();

//门店运费退款
$api->storeRefund();

//门店运费流水查询
$api->queryFlow();

//门店余额查询
$api->balanceQuery();

//查询运费
$api->previewAddOrder();

//创建配送单
$api->addOrder();

//查询配送单
$api->queryOrder();

//取消配送单
$api->cancelOrder();

//模拟回调接口
$api->mockNotify();
```

二次开发
----

[](#二次开发)

配置管理类：`Ledc\IntraCity\Config`

同城配送API：`Ledc\IntraCity\ExpressApi`

你可以继承`Ledc\IntraCity\Config`或`Ledc\IntraCity\ExpressApi`，扩展您需要的功能。

捐赠
--

[](#捐赠)

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

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance50

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

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

Recently: every ~59 days

Total

8

Last Release

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

### Embed Badge

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

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

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M674](/packages/laravel-socialite)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)

PHPackages © 2026

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