Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
Updated the text.php (example file)
Browse files Browse the repository at this point in the history
Removed @ from readme before deprecated
  • Loading branch information
Petschko committed Aug 6, 2018
1 parent b8ed779 commit 7002ea6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ require_once(__DIR__ . '/includes/_nonComposerLoader.php');

This Project is written for the DHL-SOAP-API **Version 2 or higher**.

Version 1 Methods are marked as @deprecated and will removed soon. Please upgrade to the API-Version 2 as soon as possible.
Version 1 Methods are marked as deprecated and will removed soon. Please upgrade to the API-Version 2 as soon as possible.

## Usage / Getting started

Expand Down
9 changes: 6 additions & 3 deletions test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
// Set Shipment Details
$shipmentDetails = new ShipmentDetails($credentials->getEkp(10) . '0101'); // Create a Shipment-Details with the first 10 digits of your EKP-Number and 0101 (?)
$shipmentDetails->setShipmentDate('2017-01-30'); // Optional: Need to be in the future and NOT on a sunday | null or drop it, to use today
$shipmentDetails->setNotificationEmail('peter-91@hotmail.de'); // Needed if you want inform the receiver via mail
//$shipmentDetails->setReturnAccountNumber($credentials->getEkp(10) . '0701'); // Needed if you want to print a return label
//$shipmentDetails->setReturnReference($reference); // Only needed if you want to print a return label

// Set Sender
$sender = new Sender();
$sender->setName('Peter Muster');
/*$sender->setFullStreet('Test Straße 12a'); // Do not use this anymore!*/
$sender->setStreetName('Test Straße');
$sender->setStreetNumber('12a');
$sender->setZip('21037');
Expand All @@ -48,7 +48,6 @@
// Set Receiver
$receiver = new Receiver();
$receiver->setName('Test Empfänger');
/*$receiver->setFullStreet('Test Straße 23b'); // Do not use this anymore!*/
$receiver->setStreetName('Test Straße');
$receiver->setStreetNumber('23b');
$receiver->setZip('21037');
Expand All @@ -65,6 +64,7 @@

// Required just Credentials also accept Test-Modus and Version
$dhl = new BusinessShipment($credentials, /*Optional*/$testModus, /*Optional*/$version);

// You can add your own API-File (if you want to use a remote one or your own) - else you don't need this
//$dhl->setCustomAPIURL('http://myserver.com/myAPIFile.wsdl');

Expand All @@ -75,7 +75,6 @@
//$dhl->setReturnReceiver($returnReceiver); // Needed if you want print a return label
$dhl->setService($service);
$dhl->setShipmentDetails($shipmentDetails);
//$dhl->setReceiverEmail('receiver@mail.com'); // Needed if you want inform the receiver via mail
$dhl->setLabelResponseType(BusinessShipment::RESPONSE_TYPE_URL);

$response = $dhl->createShipment(); // Creates the request
Expand All @@ -93,6 +92,10 @@
//$manifestDHL = new BusinessShipment($credentials, $testModus, $version);
//$manifestResponse = $manifestDHL->doManifest('shipmentNumber');

// To do a Manifest-Request you can use the doManifest method - you have to provide a Shipment-Number
//$getManifestDHL = new BusinessShipment($credentials, $testModus, $version);
//$getManifestResponse = $getManifestDHL->getManifest('YYYY-MM-DD'); // Need to be in the past or today after doManifest()

// Get the result (just use var_dump to show all results)
if($response !== false)
var_dump($response);
Expand Down

0 comments on commit 7002ea6

Please sign in to comment.