1. Go to this page and download the library: Download siliconstraits/cems-php-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/ */
siliconstraits / cems-php-sdk example snippets
$client = new CEMS\Client($access_token, $apiUrl);
$client = new CEMS\Client($email, $password, $apiUrl);
$customer = $client->get('customers/$id')->getObject(); // CEMS\Resource
$customers = $client->get('customers')->getObjectList('customer'); // CEMS\Collection Class contains many CEMS\Customer elements
$customer->name = 'Nguyen Le Xuan';
echo $customer->name;
foreach ($customers as $customer) {
print_r($customer->toArray());
// toObject()
}