PHP code example of makerlin96 / pinduoduo-sdk

1. Go to this page and download the library: Download makerlin96/pinduoduo-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/ */

    

makerlin96 / pinduoduo-sdk example snippets


composer 

use makerlin96\pinduoduoSDK
class IndexController 
{
  private $clientId = 'xxxxxxxxxx';
  private $clientSecret = 'xxxxxxxxxx';
  public function index()
  {
    $client = new HttpClient($this->clientId,$this->clientSecret);
    $request = new PddDdkGoodsSearchRequest();
    $request->setPage = 1;
    $request->setPageSize = 10;
    $response = $client->syncInvoke($request);
    var_dump($response);
  }
}