ebonit/centiro 问题修复 & 功能扩展

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

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

ebonit/centiro

最新稳定版本:1.0.7

Composer 安装命令:

composer require ebonit/centiro

包简介

PHP client for the Centiro SOAP webservice

README 文档

README

Latest Stable Version Total Downloads License

Installation:

composer require ebonit/centiro

Basic Usage:

use \Ebonit\Centiro\Client;

$client = new Client($cntiro_username, $centiro_password);

Example to create a new shipment: shipment requirements can be found at

Ebonit\Centiro\Method\Shipment
$shipment['Addresses'] = [$this->createAddressData($arguments)]; 
$shipment['Attributes'] = $this->createAttributes($pd, $format);
$shipment['Parcels'] = [$this->createParcelData($arguments)];            
$shipment['OrderNumber'] = $shipmentIdentifier;
$shipment['SenderCode'] = $_ASENDIA_CUSTOMER_ID);
$shipment['ShipDate'] = date("Y-m-d", strtotime('+2 days')).'T'.date("H:i:s");
$shipment['ShipmentIdentifier'] = $shipmentIdentifier;
$shipment['Currency'] = 'EUR';

Example to create parcel and print the sticker: parcel, details can be found at

Ebonit\Centiro\Method\Parcel
$parcelDetails = [...aarray with required details...];
$response = $client->addAndPrintShipment($shipment);

To save the sticker data (zpl, pdf is also possible):

$printFile = base_path() . "/storage/centiro_zpl/" . $response->Shipments->SequenceNumber . ".zpl";
file_put_contents($printFile, base64_decode($response->ParcelDocuments->ParcelDocument->Content));

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-06-12