PHP code example of buoly / meituan-takeaway

1. Go to this page and download the library: Download buoly/meituan-takeaway 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/ */

    

buoly / meituan-takeaway example snippets


use Buoly\MeituanTakeaway\MeituanTakeaway;
.
.
.

$config = [
    'app_id' => 4625,
    'app_secret' => '6b69d70eb76f6189a1fb9ba9a80f2df2',
    'log_path' => 'logs/meituan.log',
];

$meituan = new MeituanTakeaway($config);

$shop = [.....];
$meituan->order->create($shop);

$order = [.....];
$meituan->order->create($order);