07/03
2017
SPS Webship Api PHP client implementation
SPS Webship API PHP client implementation. See webservice documentation for details., (*1)
Install the latest version using composer require riesenia/sps-webship-api
, (*2)
Create API with username and password, (*3)
use Riesenia\SpsWebship\Api; $api = new Api($username, $password);
$data = [ 'cod' => [ 'codvalue' => 12.30 ], 'insurvalue' => 12.30, 'notifytype' => 1, ... ]; if (!$api->createShipment($shipment)) { echo $api->getMessages(); }
$url = $api->printShipmentLabels(); if (!$url) { echo $api->getMessages(); }
$url = $api->printEndOfDay(); if (!$url) { echo $api->getMessages(); }