<?php /* * This file is part of the TNTExpress package. * * (c) Alexandre Bacco * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use TNTExpress\Client\TNTClient; use TNTExpress\Client\SoapClientBuilder; use TNTExpress\Exception\ExceptionManager; use TNTExpress\Exception\ClientException; require __DIR__ . '/../vendor/autoload.php'; $builder = new SoapClientBuilder('login', 'password'); $soapClient = $builder->createClient(true); $TNTClient = new TNTClient($soapClient, new ExceptionManager()); try { $city = $TNTClient->getCitiesGuide('76130'); var_dump($city); } catch (ClientException $e) { var_dump($e->getMessage()); }
<?php /* * This file is part of the TNTExpress package. * * (c) Alexandre Bacco * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use TNTExpress\Client\TNTClient; use TNTExpress\Client\SoapClientBuilder; use TNTExpress\Exception\ExceptionManager; use TNTExpress\Exception\ClientException; require __DIR__ . '/../vendor/autoload.php'; $builder = new SoapClientBuilder('login', 'password'); $soapClient = $builder->createClient(true); $TNTClient = new TNTClient($soapClient, new ExceptionManager()); try { $parcel = $TNTClient->getTrackingByConsignment('9412345000000043'); var_dump($parcel); } catch (ClientException $e) { var_dump($e->getMessage()); }
<?php /* * This file is part of the TNTExpress package. * * (c) Alexandre Bacco * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use TNTExpress\Client\TNTClient; use TNTExpress\Client\SoapClientBuilder; use TNTExpress\Exception\ExceptionManager; use TNTExpress\Exception\ClientException; require __DIR__ . '/../vendor/autoload.php'; $builder = new SoapClientBuilder('login', 'password'); $soapClient = $builder->createClient(true); $TNTClient = new TNTClient($soapClient, new ExceptionManager()); try { $points = $TNTClient->getDropOffPoints('76130', 'Mont St Aignan'); var_dump($points); } catch (ClientException $e) { var_dump($e->getMessage()); }
* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use TNTExpress\Client\TNTClient; use TNTExpress\Client\SoapClientBuilder; use TNTExpress\Exception\ClientException; use TNTExpress\Exception\ExceptionManager; use TNTExpress\Model\Sender; use TNTExpress\Model\Receiver; use TNTExpress\Model\ParcelRequest; use TNTExpress\Model\PickUpRequest; require __DIR__ . '/../vendor/autoload.php'; $builder = new SoapClientBuilder('login', 'password'); $soapClient = $builder->createClient(true); $TNTClient = new TNTClient($soapClient, new ExceptionManager()); $sender = new Sender(); $sender->setName('Caissin'); $sender->setAddress1('73 Boulevard de Grenelle'); $sender->setZipCode('75015'); $sender->setCity('Paris'); $receiver = new Receiver(); $receiver->setAddress1('9 rue Port du Temple'); $receiver->setZipCode('69002'); $receiver->setCity('Lyon'); $receiver->setContactFirstName('Alex'); $receiver->setContactLastName('Durand'); $receiver->setEmailAddress('*****@*****.**'); $receiver->setPhoneNumber('0235760912'); $receiver->setType('INDIVIDUAL'); //$receiver->setName('Fleuriste');