robinsaillard/tnt-express 问题修复 & 功能扩展

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

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

robinsaillard/tnt-express

Composer 安装命令:

composer require robinsaillard/tnt-express

包简介

TNT Express

README 文档

README

Création d'étiquette tnt à l'international via le webservice (https://express.tnt.com/expresswebservices-website/app/routinglabelrequest.html)

Installation

composer install robinsaillard/tnt-express

Add bundle symfony

RS\TntExpress\TntExpressBundle::class => ['all' => true]

Installation ressource

php bin/console assets:install

Création étiquette en html

use RS\TntExpress\TntExpressInfo;
use RS\TntExpress\Services\ShipRequest;



$tnt = new TntExpressInfo("IdUser","password"); 

$tnt->setConsignementIdentity(string $customerReference, string $consignmentNumber = null)
    ->setCollectionDateTime(DateTime $collectionDateTime)

    ->setSender(string $name, string $addressLine1, string $addressLine2 = null, string $addressLine3 = null, 
                string $town, string $exactMatch = null, string $province = null, string $postcode = null , 
                string $country, string $contactName, string $dialCode, string $telephone, string $mail) 

    ->setDelivery(string $name, string $addressLine1, string $addressLine2 = null, string $addressLine3 = null, 
                string $town, string $exactMatch = null, string $province = null, string $postcode = null , 
                string $country, string $contactName, string $dialCode, string $telephone, string $mail)

    ->setProduct(string $lineOfBusiness, string $groupId, string $subGroupId, string $type , string $id, 
                 string $service, string $option = null)

    ->setAccount(string $accountNumber, string $accountCountry, string $contactName, string $dialCode, 
                 string $mail, string $telephone)

    ->setOptionalElements(string $bulkShipment = null , string $specialInstructions = null , string $cashAmount = null, 
                          string $cashCurrency = null , string $cashType = null , string $customControlled= null, 
                          string $termsOfPayment = null)

    ->setPackage(int $itemNumber, float $poids, float $longueur, float $largeur, float $hauteur, string $description); 

                
//$val = ["CREATE", "BOOK", "SHIP","PRINT"]
$xml = new ShipRequest($tnt, $val);

$html = $xml->getShippingRequest();

echo $html; 

Vérification code postal ou ville

use RS\TntExpress\TntExpressInfo;
use RS\TntExpress\Services\TownPostRequest;

$tnt = new TntExpressInfo("IdUser","password"); 
$request = new TownPostRequest($tnt); 
$result = $request->getTownPostRequest($pays = "FR", $ville,  $postcode); 

//output : 
$result : array(
    array(
        "searchItem" => 1,
        "postcode" => "NNNNN",
        "ville" => "xxxxxxxxx"
    ), 
    [],
);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-11-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固