A PHP library for integrating with SPS Commerce via SFTP.
composer require thegrommet/sps-connector
use SpsConnector\Document\ShippingLabel;
use SpsConnector\LabelService;
$labelDocument = new ShippingLabel();
$label = $labelDocument->addLabel();
// add label specifics
$service = new LabelService('username', 'password');
$pdf = $service->getLabel($labelDocument->__toString(), '5311', $service::FORMAT_PDF);
file_put_contents('label.pdf', $pdf);
composer test
# sniff src folder
composer cs
# sniff tests folder
composer cs-tests
# fix src folder
composer cbf
# fix tests folder
composer cbf-tests