PHP code example of yumufeng / pdd-union-sdk
1. Go to this page and download the library: Download yumufeng/pdd-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/ */
yumufeng / pdd-union-sdk example snippets
error_reporting(E_ALL);
application/json;charset=UTF-8");
$config = [
'appId' => '', // 拼多多开放平台 client_id
'appSk' => '', // 拼多多开放平台 client_secret
'ddkId' => '', // 多多客ID,
'pid' => '',
'isCurl' => true // 是否强制使用curl ,设置false为强制使用curl,系统将会自动适配swoole 协程
];
$pdd = new \pddUnionSdk\pddUnionFactory($config);
$info = $pdd->goods->mall('918323727');
if ($info === false) {
var_dump($pdd->getError());
}
var_dump($info);