PHP code example of motokraft / paket-rusbid-sdk

1. Go to this page and download the library: Download motokraft/paket-rusbid-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/ */

    

motokraft / paket-rusbid-sdk example snippets




// API ключ полученный на странице (https://paket.rusbid.de/rest-api)
$api_key = 'hPMKKYFGkbsKs3tmGtVo1bnFtf7MiLRalPH30iA0KtQPHyWRJ';

use \Motokraft\PaketRusBid\PaketRusBid;
$paket = new PaketRusBid($api_key);

// API ключ полученный на странице (https://paket.rusbid.de/rest-api)
$api_key = 'hPMKKYFGkbsKs3tmGtVo1bnFtf7MiLRalPH30iA0KtQPHyWRJ';

use \Motokraft\PaketRusBid\PaketRusBid;

$paket = new PaketRusBid($api_key);
$package = $paket->getPackage();

if($id = $package->addItem($params))
{
    // код есть посылка создана
    return true;
}

foreach($package->getErrors() as $error)
{
    echo __LINE__ . ' | ' . $error . '<br>';
}

$ php composer