PHP code example of dmitriy12345work / spsr-shipment

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

    

dmitriy12345work / spsr-shipment example snippets


use stp\spsr\SpsrApi;

$api = new SpsrApi($login, $password, $icn);


use stp\spsr\message\GetCitiesMessage,
    stp\spsr\response\City;

$msg = new GetCitiesMessage();
$msg->CityName = 'Москва';

/** @var City[] $cities */
$cities = $api->request($msg);