opportus/sls-client 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固