PHPackages                             kylin987/meituan-sdk - 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. [API Development](/categories/api)
4. /
5. kylin987/meituan-sdk

ActiveLibrary[API Development](/categories/api)

kylin987/meituan-sdk
====================

1.0.1(5y ago)05MITPHP

Since Nov 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kylin987/meituan-sdk)[ Packagist](https://packagist.org/packages/kylin987/meituan-sdk)[ RSS](/packages/kylin987-meituan-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

meituan-sdk
===========

[](#meituan-sdk)

美团 SDK

安装
--

[](#安装)

`composer require kylin987/meituan-sdk`

文档
--

[](#文档)

### 实例化

[](#实例化)

```
$meituan = new Meituan([
    'developer_id' => '',
    'sign_key' => '',
    'debug' => true, // 输出日志
    'log' => [
        'name' => 'meituan',
        'file' => storage_path('logs/meituan.log'),
        'level'      => 'debug',
        'permission' => 0777,
    ]
]);
```

### 获取授权链接

[](#获取授权链接)

```
// 获取授权链接
$url = $meituan->store->getAuthorizeUrl([
    'businessId' => 2, // 2 为外卖
    'ePoiId' => 'your-ePoiId',
    'callbackUrl' => 'http://example.com/callback',
]);

```

### 获取授权门店

[](#获取授权门店)

```
$response = $meituan->store->callback();

if (empty($response)) {
    return false;
}

$authToken = $response['appAuthToken'];

// 获取门店信息
$info = $meituan->createAuthorizer($authToken)->waimai->poi->queryPoiInfo($response['ePoiId']);

```

### 解绑门店链接

[](#解绑门店链接)

```
return $meituan->store->getUnbindUrl(2);

```

### 获取门店的实例

[](#获取门店的实例)

```
$meituan = $meituan->createAuthorizer('token');

```

### 其他实例

[](#其他实例)

```
// 获取门店实例
$meituan = $meituan->createAuthorizer('token');

// 订单实例
$order = $meituan->order;

// 菜品实例
$dish = $meituan->dish;

// 门店实例
$poi = $meituan->poi;

// 团购券实例
$coupon = $meituan->coupon;

```

### 具体API

[](#具体api)

具体API可参考美团文档，只需要传业务级别的参数即可

[![QQ图片20170922125319.png](https://camo.githubusercontent.com/c4396f228cd82c532f869770ca0190d7508a7bd80de627059dfdd595cbfd276b/68747470733a2f2f692e6c6f6c692e6e65742f323031372f30392f32322f353963343937363830623238632e706e67)](https://camo.githubusercontent.com/c4396f228cd82c532f869770ca0190d7508a7bd80de627059dfdd595cbfd276b/68747470733a2f2f692e6c6f6c692e6e65742f323031372f30392f32322f353963343937363830623238632e706e67)

如此 API 即为

```
$order->queryById('order-id');

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Total

2

Last Release

2005d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f1c0726daff91d74835f3ef3901923fdf7b6b0b65d919968682b53edd22c9cc?d=identicon)[kylin987](/maintainers/kylin987)

### Embed Badge

![Health badge](/badges/kylin987-meituan-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/kylin987-meituan-sdk/health.svg)](https://phpackages.com/packages/kylin987-meituan-sdk)
```

###  Alternatives

[justmd5/pinduoduo-sdk

拼多多API SDK【拼多多开放平台】.

23514.1k1](/packages/justmd5-pinduoduo-sdk)

PHPackages © 2026

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