PHP code example of printu / elektroniczny-nadawca
1. Go to this page and download the library: Download printu/elektroniczny-nadawca 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/ */
printu / elektroniczny-nadawca example snippets
/**
* Minimal options
*/
$options = [
WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_URL => \PocztaPolska\EnumType\WsdlType::getPath(),
WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_CLASSMAP => \PocztaPolska\ClassMap::get(),
WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_LOGIN = "login",
WsdlToPhp\PackageBase\AbstractSoapClientBase::WSDL_PASSWORD = "secret",
];
/**
* Samples for Service ServiceType
*/
$service = new \PocztaPolska\ServiceType\Service($options);
/**
* Sample call for addShipment operation/method
*/
if ($service->addShipment(new \PocztaPolska\StructType\AddShipment()) !== false) {
print_r($service->getResult());
} else {
print_r($service->getLastError());
}