sylapi / courier-inpost
Courier
Installs: 9 440
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: >=8.2.0
- guzzlehttp/guzzle: ^7.2
- rakit/validation: ^1.4
- sylapi/courier: v3.0.0
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.4
README
Courier library
Installation
Courier to install, simply add it to your composer.json
file:
{ "require": { "sylapi/courier-inpost": "~1.0" } }
Shipping information:
$courier = new Courier('Inpost'); $courier->sandbox(true); $courier->setLogin('10001'); // ID organizacji $courier->setToken('abcdef-123456'); // Token $address = [ 'name' => 'Name Lastname', 'company' => 'Company Name', 'street' => 'Street 123/2A', 'postcode' => '12-123', 'city' => 'Warszawa', 'country' => 'PL', 'phone' => '602602602', 'email' => 'name@example.com' ]; $courier->setSender($address); $courier->setReceiver($address); $courier->setOptions([ 'weight' => 3.00, 'width' => 30.00, 'height' => 50.00, 'depth' => 10.00, 'amount' => 2390.10, 'currency' => 'PLN', 'cod' => true, 'references' => 'order #4567', 'note' => 'Note', 'custom' => [ 'is_non_standard' => true, 'service' => 'inpost_locker_standard', 'external_customer_id' => 12345, 'target_point' => '' ], ]);