dansmaculotte / colissimo-php
Colissimo Web Services PHP library
Installs: 5 091
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 5
Forks: 6
Open Issues: 1
Requires
- php: ^7.2|^8.1
- ext-json: *
- ext-simplexml: *
- guzzlehttp/guzzle: ^7.0
- spatie/opening-hours: ^2.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.7
- nesbot/carbon: ^2.57
- phpunit/phpunit: ^9.5
README
This library aims to facilitate the usage of Colissimo Web Services
Services
Installation
Requirements
- PHP 7.2
- Json Extension
- SimpleXML Extension
You can install the package via composer:
composer require dansmaculotte/colissimo-php
Usage
Web Services Status
use DansMaCulotte\Colissimo\Colissimo; try { $colissimo = new Colissimo(); $colissimo->checkWebServiceStatus(); } catch (\Exception $e) { print_r($e); }
Delivery Choice
Find pickup points
use DansMaCulotte\Colissimo\DeliveryChoice; $delivery = new DeliveryChoice( [ 'accountNumber' => COLISSIMO_LOGIN, 'password' => COLISSIMO_PASSWORD, ] ); $result = $delivery->findPickupPoints( 'Caen', '14000', 'FR', Carbon::now()->format('d/m/Y'), [ 'address' => '7 rue Mélingue', ] ); print_r($result);
Find pickup point by ID
use DansMaCulotte\Colissimo\DeliveryChoice; $delivery = new DeliveryChoice( [ 'accountNumber' => COLISSIMO_LOGIN, 'password' => COLISSIMO_PASSWORD, ] ); $result = $delivery->findPickupPointByID( '149390', Carbon::now()->format('d/m/Y') ); print_r($result);
Parcel Tracking
Get parcel status by ID
use DansMaCulotte\Colissimo\ParcelTracking; $parcelTracking = new ParcelTracking( [ 'accountNumber' => COLISSIMO_LOGIN, 'password' => COLISSIMO_PASSWORD, ] ); $result = $parcelTracking->getStatusByID('111111111'); print_r($result);
License
The MIT License (MIT). Please see License File for more information.