PHP code example of shishaoqi / meituan-flash-purchase
1. Go to this page and download the library: Download shishaoqi/meituan-flash-purchase library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shishaoqi / meituan-flash-purchase example snippets
use Shishaoqi\MeituanFlashPurchase\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([]);
......