PHP code example of wored / wangdiantong-sdk
1. Go to this page and download the library: Download wored/wangdiantong-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/ */
wored / wangdiantong-sdk example snippets
use \Wored\WangDianTongSdk\WangDianTongSdk;
$config = [
"log" => [
"file" => "../storage/logs/Wangdiantong.log",
"name" => "Wangdiantong",
"level" => "debug",
"permission" => 777
],
"sid" => "******",
"debug" => false,
"appkey" => "***************",
"rootUrl" => "https://sandbox.wangdian.cn",
"appsecret" => "************"
];
//旺店通SDK
$wdt = new WangDianTongSdk($config);
//获取店铺
$ret = $wdt->request('shop');