PHP code example of smart-dato / dhl-connect-plus-sdk
1. Go to this page and download the library: Download smart-dato/dhl-connect-plus-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
smart-dato / dhl-connect-plus-sdk example snippets
use SmartDato\DhlConnectPlusClient\DhlConnectPlusConnector;
use SmartDato\DhlConnectPlusClient\Requests\Authentication\Authenticate;
$connector = new DhlConnectPlusConnector;
$token = $connector->send(new Authenticate('test', 'user'));
// Token is automatically stored and used for subsequent requests
use SmartDato\DhlConnectPlusClient\DhlConnectPlusConnector;
use SmartDato\DhlConnectPlusClient\Requests\Tracking\Track;
use SmartDato\DhlConnectPlusClient\Enums\Idioma;
use SmartDato\DhlConnectPlusClient\Enums\Show;
$connector = new DhlConnectPlusConnector;
$trackEvent = $connector->send(new Track(
id: '0870002260',
idioma: Idioma::En,
show: Show::Events,
));
// Returns array of tracking events