dev-master
9999999-devDHL myAPI
MIT
The Requires
- tecnickcom/tcpdf ^6.2
- php >=7.1
- nette/tester 2.0.1
by Pavol Biely
Wallogit.com
2017 © Pedro Peláez
DHL myAPI
Please ask DHL for username, password and Customer ID in order to access their API., (*2)
Use composer to install this package., (*3)
Create a package and order a courier., (*4)
$dhl = new Dhl('user', 'pass', 1234, __DIR__ . '/temp');
$payment = new Payment('SK4123000000000002045678', 'POBNSKBA', '123456', 100.0);
$sender = NULL;
$recipient = new Address('TEST','TEST','TEST','TEST','SK');
$package = new Package(25183385203, Package::TYPE_SK_COD, Package::DEPO_HQ_BRATISLAVA, $recipient, $sender, $payment, [Package::FLAG_SAT], 'TEST');
$dhl->createPackages([$package]);
$dhl->createPickupOrders([new PickupOrder('TEST','TEST', 1, $recipient, 'info@example.org', NULL, NULL, NULL, 'TEST')])
Generating PDF labels, (*5)
header('Content-Type: application/pdf');
echo PdfLabel::generateLabels($packages, PdfLabel::QUARTER);
Tests are build with Nette Tester. You can run it like this:, (*6)
php -f tester ./ -c php.ini-mac --coverage coverage.html --coverage-src ../src
This code is based and inspired by salamek/ppl-my-api., (*7)
MIT License (c) Pavol Biely, (*8)
Read the provided LICENSE file for details., (*9)
DHL myAPI
MIT