Current File : /home/users/barii/public_html/finansenl.com.pl/wodki/admin/kurierinpost/sample-inpostcourier.php
<?php
/**
 * Test with InpostCourier for 'https://api-kurier.inpost.pl/api/api.asmx?WSDL'
 * @package InpostCourier
 * @author WsdlToPhp Team <contact@wsdltophp.com>
 * @version 20150429-01
 * @date 2016-10-02
 */
ini_set('memory_limit','512M');
ini_set('display_errors',true);
error_reporting(-1);
/**
 * Load autoload
 */
require_once dirname(__FILE__) . '/InpostCourierAutoload.php';
/**
 * Wsdl instanciation infos. By default, nothing has to be set.
 * If you wish to override the SoapClient's options, please refer to the sample below.
 * 
 * This is an associative array as:
 * - the key must be a InpostCourierWsdlClass constant beginning with WSDL_
 * - the value must be the corresponding key value
 * Each option matches the {@link http://www.php.net/manual/en/soapclient.soapclient.php} options
 * 
 * Here is below an example of how you can set the array:
 * $wsdl = array();
 * $wsdl[InpostCourierWsdlClass::WSDL_URL] = 'https://api-kurier.inpost.pl/api/api.asmx?WSDL';
 * $wsdl[InpostCourierWsdlClass::WSDL_CACHE_WSDL] = WSDL_CACHE_NONE;
 * $wsdl[InpostCourierWsdlClass::WSDL_TRACE] = true;
 * $wsdl[InpostCourierWsdlClass::WSDL_LOGIN] = 'myLogin';
 * $wsdl[InpostCourierWsdlClass::WSDL_PASSWD] = '**********';
 * etc....
 * Then instantiate the Service class as: 
 * - $wsdlObject = new InpostCourierWsdlClass($wsdl);
 */
/**
 * Examples
 */


/*************************************
 * Example for InpostCourierServiceGet
 */
$inpostCourierServiceGet = new InpostCourierServiceGet();
// sample call for InpostCourierServiceGet::GetTracking()
if($inpostCourierServiceGet->GetTracking(new InpostCourierStructGetTracking(/*** update parameters list ***/)))
    print_r($inpostCourierServiceGet->getResult());
else
    print_r($inpostCourierServiceGet->getLastError());
// sample call for InpostCourierServiceGet::GetLabel_Consolidated()
if($inpostCourierServiceGet->GetLabel_Consolidated(new InpostCourierStructGetLabel_Consolidated(/*** update parameters list ***/)))
    print_r($inpostCourierServiceGet->getResult());
else
    print_r($inpostCourierServiceGet->getLastError());
// sample call for InpostCourierServiceGet::GetLabel()
if($inpostCourierServiceGet->GetLabel(new InpostCourierStructGetLabel(/*** update parameters list ***/)))
    print_r($inpostCourierServiceGet->getResult());
else
    print_r($inpostCourierServiceGet->getLastError());
// sample call for InpostCourierServiceGet::GetAvailableServices()
if($inpostCourierServiceGet->GetAvailableServices(new InpostCourierStructGetAvailableServices(/*** update parameters list ***/)))
    print_r($inpostCourierServiceGet->getResult());
else
    print_r($inpostCourierServiceGet->getLastError());
// sample call for InpostCourierServiceGet::GetManifest()
if($inpostCourierServiceGet->GetManifest(new InpostCourierStructGetManifest(/*** update parameters list ***/)))
    print_r($inpostCourierServiceGet->getResult());
else
    print_r($inpostCourierServiceGet->getLastError());
// sample call for InpostCourierServiceGet::GetCodReport()
if($inpostCourierServiceGet->GetCodReport(new InpostCourierStructGetCodReport(/*** update parameters list ***/)))
    print_r($inpostCourierServiceGet->getResult());
else
    print_r($inpostCourierServiceGet->getLastError());
// sample call for InpostCourierServiceGet::GetReturnLabel()
if($inpostCourierServiceGet->GetReturnLabel(new InpostCourierStructGetReturnLabel(/*** update parameters list ***/)))
    print_r($inpostCourierServiceGet->getResult());
else
    print_r($inpostCourierServiceGet->getLastError());
// sample call for InpostCourierServiceGet::GetServices()
if($inpostCourierServiceGet->GetServices(new InpostCourierStructGetServices(/*** update parameters list ***/)))
    print_r($inpostCourierServiceGet->getResult());
else
    print_r($inpostCourierServiceGet->getLastError());

/****************************************
 * Example for InpostCourierServiceCreate
 */
$inpostCourierServiceCreate = new InpostCourierServiceCreate();
// sample call for InpostCourierServiceCreate::CreateShipment()
if($inpostCourierServiceCreate->CreateShipment(new InpostCourierStructCreateShipment(/*** update parameters list ***/)))
    print_r($inpostCourierServiceCreate->getResult());
else
    print_r($inpostCourierServiceCreate->getLastError());

/**************************************
 * Example for InpostCourierServiceCall
 */
$inpostCourierServiceCall = new InpostCourierServiceCall();
// sample call for InpostCourierServiceCall::CallPickup()
if($inpostCourierServiceCall->CallPickup(new InpostCourierStructCallPickup(/*** update parameters list ***/)))
    print_r($inpostCourierServiceCall->getResult());
else
    print_r($inpostCourierServiceCall->getLastError());

/****************************************
 * Example for InpostCourierServiceCancel
 */
$inpostCourierServiceCancel = new InpostCourierServiceCancel();
// sample call for InpostCourierServiceCancel::CancelShipment()
if($inpostCourierServiceCancel->CancelShipment(new InpostCourierStructCancelShipment(/*** update parameters list ***/)))
    print_r($inpostCourierServiceCancel->getResult());
else
    print_r($inpostCourierServiceCancel->getLastError());