PHP code example of dansleboby / lightspeed-xseries-sdk

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

    

dansleboby / lightspeed-xseries-sdk example snippets




ightSpeed\XSeries\XSeriesSdk;
use LightSpeed\XSeries\Requests\Retailers\GetRetailer;

// 1. Instantiate the Connector
$connector = new XSeriesSdk('domain_prefix', "token");

$request = new GetRetailer;

try {
	var_dump($connector->send($request)
					   ->body());
} catch(\Saloon\Exceptions\Request\FatalRequestException $e) {
	die("Fatal error: " . $e->getMessage());
} catch(\Saloon\Exceptions\Request\RequestException $e) {
	die("Request error: " . $e->getMessage());
}