PHP code example of xhkj-supply / lyxx-php-sdk
1. Go to this page and download the library: Download xhkj-supply/lyxx-php-sdk 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/ */
xhkj-supply / lyxx-php-sdk example snippets
use Xhkj\Lyxx\LyxxClient;
$appKey = "your appkey";
$appSecret = "your appSecret";
try {
$lyxxClient = new LyxxClient($appKey,$appSecret);
} catch (OssException $e) {
printf(__FUNCTION__ . "creating lyxxClient instance: FAILED\n");
printf($e->getMessage() . "\n");
return null;
}
//获取开发者登录信息
$param = [
'action'=>"dininghall/open_api/api/loginuserinfo"
];
$response = json_decode($lyxxClient->getApiResponse("get","/food/api",$param));
bash
$ composer