PHP code example of onetech / easy-shopee

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

    

onetech / easy-shopee example snippets




use Onetech\EasyShopee\Exception\ShopeeException;
use Onetech\EasyShopee\Shopee;

= new \Doctrine\Common\Cache\RedisCache();
$cache->setRedis($redis);

$shopee = new Shopee([
    'app_key' => 'Your Test Partner_id',//int
    'app_secret' => 'Your Test Key',//string
    'debug' => app()->isDebug(),
    'sandbox' => false,
    'log' => [
        'name' => 'Shopee',
        'file' => sys_get_temp_dir() . '/Shopee.log',
        'level' => 'debug',
        'permission' => 0777,
    ],
    'cache' => $cache
]);