PHP code example of hanccc / weidian

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

    

hanccc / 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));