opensdk / meituan
美团开放平台SDK
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 0
Type:libaray
Requires
- php: >=7.0.0
Requires (Dev)
- php: >=7.0.0
This package is not auto-updated.
Last update: 2024-11-21 22:46:06 UTC
README
介绍
本类库是对美团开放平台API的封装
使用示例
require 'vendor/autoload.php'; use OpenSDK\Meituan\Client; use OpenSDK\Meituan\Requests\MeituanOrdersQueryGetRequest; $c = new Client(); $c->appKey = $this->appKey; $c->appSecret = $this->appSecret; $c->gatewayUrl = $this->url; $req = new MeituanOrdersQueryGetRequest(); $oid = ''; //订单id $req->setOid($oid); //平台唯一标识 $req->setSid('326c433346a4760ef5e2'); $req->setType(4); $c->execute($req); $response = $c->result(); if(empty($response) || !isset($response[0]['order']['orderid'])){ echo '无结果';exit; } var_dump($response);exit;