PHP code example of hisway / jd-union-sdk
1. Go to this page and download the library: Download hisway/jd-union-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/ */
hisway / jd-union-sdk example snippets
$config = [
'appkey' => '', // AppId
'appSecret' => '', // 密钥
'unionId' => '', // 联盟ID
'positionId' => '', // 推广位ID
'siteId' => '', // 网站ID,
'apithId' => '', // 第三方网站Apith的appid (可选,不使用apith的,可以不用填写)
'apithKey' => '', // 第三方网站Apith的appSecret (可选,不使用apith的,可以不用填写)
'isCurl' => true // 设置为true的话,强制使用php的curl,为false的话,在swoole cli环境下自动启用 http协程客户端
];
$client = new \JdMediaSdk\JdFatory($config);
$result = $client->apith->querySeckillGoods();
if ($result == false ) {
var_dump($client->getError());
}
var_dump($result);