printu / elektroniczny-nadawca
Elektroniczny Nadawca WebAPI
Installs: 55 987
Dependents: 1
Suggesters: 0
Security: 0
Stars: 12
Watchers: 4
Forks: 5
Open Issues: 0
Requires
- php: ^7.4|^8.1
- ext-soap: *
- wsdltophp/packagebase: ~5.0
- wsdltophp/wssecurity: ~2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.25
- vimeo/psalm: ^5.15
- wsdltophp/packagegenerator: ^4.1
This package is auto-updated.
Last update: 2024-12-13 12:59:52 UTC
README
PHP bindings for the e-nadawca Poczta Polska (https://e-nadawca.poczta-polska.pl/).
Installation
The API client can be installed via Composer.
In your composer.json file:
{ "require": { "printu/elektroniczny-nadawca": "^14.0.0" } }
Once the composer.json file is created you can run composer install
for the initial package install and composer update
to update to the latest version of the API client.
Example
require_once __DIR__ . '/vendor/autoload.php'; /** * 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()); }
License
MIT license. See the LICENSE file for more details.