1. Go to this page and download the library: Download ledc/hanlian 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/ */
ledc / hanlian example snippets
use Ledc\HanLian\Config;
use Ledc\HanLian\MerchantApi;
$env_config = [
'use_test' => true,
'api_host' => Config::API_HOST_TEST, // 服务器地址
'app_key' => Config::APP_KEY, // 测试环境或正式环境的appKey
'app_secret' => Config::APP_SECRET, // 测试环境或正式环境的appSecret
'warehouse_no' => Config::WARE_HOUSE_NO // 测试环境或正式环境的仓库编码
];
$config = new Config($env_config);
$api = new MerchantApi($config);