PHP code example of hanson / weidian

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

    

hanson / weidian example snippets


$weidian = new Hanccc/Weidian('appkey', 'secret');
//$weidian = new Hanccc/Weidian('appkey', 'secret', 'access_token');

//上架举例

$data = ['itemid' => 'itemid', 'opt' => 1];

$weidian->send(Hanccc\Services\ItemService::itemOnSale($data));