PHP code example of xhkj-supply / php-sdk
1. Go to this page and download the library: Download xhkj-supply/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 / php-sdk example snippets
/**
* Created by PhpStorm.
* User: huidaoli
* Date: 2023/10/23
* Time: 2:04 PM
*/
use Xhkj\Api\SupplyClient;
$appKey = "your appkey";
$appSecret = "your appSecret";
try {
$supplyClient = new SupplyClient($appKey,$appSecret);
} catch (OssException $e) {
printf(__FUNCTION__ . "creating supplyClient instance: FAILED\n");
printf($e->getMessage() . "\n");
return null;
}
$param = [
];
$response = json_decode($supplyClient->getApiResponse("get","/api/base/userinfo",$param));
bash
$ composer