opportus/sls-client
最新稳定版本:v1.0.0-alpha.1
Composer 安装命令:
composer require opportus/sls-client
包简介
Colissimo Simple Label Solution (SLS) client
关键字:
README 文档
README
A Colissimo Simple Label Solution (SLS) client.
To do
- Implement cache system
- Implement unit and functional tests
- Implement benchmarks
- Implement all SLS methods
- Implement request validation based on SLS WSDL so that we economize client-server roundtrips
Installation
Requirements
- PHP >= 7.4
- libxml PHP extension installed and enabled
- soap PHP extension installed and enabled
- composer
Step 1 - Download and install the package
Open a command console, enter your project directory and execute:
$ composer require opportus/sls-client
Guide
A basic code example:
use Opportus\SlsClient\Client; $client = Client::create(); $requestParameters = [ 'contractNumber' => '111111', 'password' => '1111111', 'outputFormat' => [ 'x' => '0', 'y' => '0', 'outputPrintingType' => 'PDF_A4_300dpi', ], 'letter' => [ 'service' => [ 'productCode' => 'DOM', 'depositDate' => '2019-01-01', ], 'parcel' => [ 'weight' => '1', ], 'sender' => [ 'address' => [ 'companyName' => 'FOO', 'line2' => '1 RUE FOO', 'countryCode' => 'FR', 'city' => 'FOO', 'zipCode' => '00000', ], ], 'addressee' => [ 'address' => [ 'companyName' => 'BAR', 'line2' => '1 RUE BAR', 'countryCode' => 'FR', 'city' => 'BAR', 'zipCode' => '00000', ], ], ], ]; $response = $client->generateLabel($requestParameters); $response->getMessageId(); // '0' $response->getLabel(); // <binary attachment> $response->getParcelNumber(); // '6A11111111111'
This library is currently a passthrough client of the SLS service. Therefore, the SLS documentation covers pretty much everything else you need to know in order to use this library.
统计信息
- 总下载量: 141
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-12-18