PHP code example of zoltanlaca / isklad-api-connector

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

    

zoltanlaca / isklad-api-connector example snippets






// import classes
use ZoltanLaca\IskladApiConnector\Connector;
use ZoltanLaca\IskladApiConnector\ConnectorException;

// ', 'xxx', 'xxx');

try {
    $response = $connector
        // set the input data to the request
        ->createRequest('GetOrderStatus', [
            'original_order_id' => 123,
        ])
        // send to api
        ->send()
        // get parsed response from connector
        ->getResponseHeaders();

        // print it
        print_r($response);
} catch (ConnectorException $exception) {
    // handle error
    print_r(sprintf('Connection ERROR: %s', $exception->getMessage()));
}