require_once '../vendor/autoload.php';

use ElemeOpenApi\Config\Config;
use ElemeOpenApi\Api\ShopService;

$app_key = "FMePL8NxQi";
$app_secret = "df66a97e1cdd5a4ade982f285e2b024b17981a08";
$sandbox = false;

$token = '{ "access_token" : "69f7e31b34b022c184857be13b704236"}';
$token = json_decode($token);

$shop_id = 2097647268;

//实例化一个配置类
$config = new Config($app_key, $app_secret, $sandbox);

//使用config和token对象,实例化一个服务对象
$shop_service = new ShopService($token, $config);

//调用服务方法,获取资源
$shop = $shop_service->get_shop($shop_id);
var_dump($shop);