riesenia / sps-webship-api
SPS Webship Api PHP client implementation
Installs: 12 557
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >=7.0
README
SPS Webship API PHP client implementation. See webservice documentation for details.
Installation
Install the latest version using composer require riesenia/sps-webship-api
Usage
Create API with username and password
use Riesenia\SpsWebship\Api; $api = new Api($username, $password);
Create shipment
$data = [ 'cod' => [ 'codvalue' => 12.30 ], 'insurvalue' => 12.30, 'notifytype' => 1, ... ]; if (!$api->createShipment($shipment)) { echo $api->getMessages(); }
Print shipment labels
$url = $api->printShipmentLabels(); if (!$url) { echo $api->getMessages(); }
Print end of day report
$url = $api->printEndOfDay(); if (!$url) { echo $api->getMessages(); }