abbotton/meituan-takeaway

美团外卖开放平台PHP SDK

v1.0.9 2021-10-27 03:28 UTC

This package is auto-updated.

Last update: 2024-10-27 09:52:57 UTC


README

美团外卖开放平台PHP SDK

美团外卖开放平台PHP SDK,支持零售综合医疗综合以及团好货三大板块。

安装

composer require abbotton/meituan-takeaway

使用

use Abbotton\MeituanTakeaway\Application;

......

$config = [
    'app_id' => 'xxx',
    'app_secret' => 'xxx',
    'request_url' => '', // 默认 `https://waimaiopen.meituan.com/api/v1/`
];

$app = new Application($config);

$params = ['order_id' => '27061900338318741', 'is_mt_logistics' => 1];
$orderDetail = $app->order->getOrderDetail($params);

print_r(json_decode($orderDetail, true));

// 商品类、活动类接口支持异步队列
$app->goods->async()->create([]);
......