Download the PHP package christoph-schaeffer/dhl-business-shipping without Composer

On this page you can find all versions of the php package christoph-schaeffer/dhl-business-shipping. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dhl-business-shipping

DHL business shipping

An unofficial library for the DHL business shipping soap API (Version 3.3) written in PHP.

api version api version PHP version Build Status Coverage License

Features

This library provides access to functions provided by the official dhl business shipping soap api in an object oriented way.

Since version 3.2 this library also includes the DHL shipment tracking api to obtain tracking data of sent shipments.

These functions are:

Additional functions this library provides:

Since version 3.2 this library also includes the DHL shipment tracking api to obtain tracking data of sent shipments.

This introduced the following new features:

Getting started

Technical Requirements

Usage

There are 3 client classes in this library ShippingClient, TrackingClient and MultiClient. The MultiClient combines both Clients into one, which usually is what you want. Thus we use it as the base example. The authentication credentials are stored in 2 classes. One for the business shipping api and one for the tracking api. These 2 APIs are not the same and need different parameter for authentication.

Create a shipping client credentials object and fill it with your credentials.

Create a tracking client credentials object and fill it with your credentials.

Create a client object and fill it with your credentials.

Usage for the shipping api (shipment label creation)

The following is a simple example usage of the createShipmentOrder function. However please keep in mind that there is a lot of additional functionality. For more details or examples of other functions please read the documentation.

Create a new shipment order for each shipment you want to send.

Set the shipment details.

Set the shippers address in case the shipment can't be delivered it will be returned to that address.

Set the receivers address.

Add up to 30 shipment orders into an array.

Set up the request object, call the createShipmentOrder function and get its response.

To check if the request was successful use the hasNoErrors function. If the request itself or any of the creation state objects have errors you can display their messages.

Usage for the tracking api

The following is an example of the getPieceDetail function. If you only track shipments you have sent yourself this is the best function to use, because it contains all data getPiece and getPieceEvents will return in one request. However, this request only works with shipment numbers of shipments you have sent with the same business customer account you are using the zt token of.

Set up the request object, call the getPieceDetail function and get its response.

To check if the request was successful use the hasNoErrors function. If the request itself or any child object does not have the status code "0", which is = success, this will return false.

If you want to track shipments that you have not sent yourself you can use the getStatusForPublicUser function. This function contains less data, but works with all shipment numbers. You can also request more than one shipment number.

Please also keep in mind, that for some reason DHL decided to disable this function in sandbox mode. So you need to use production mode to test it.

Set up the pieces you want to request

Set up the request object, call the getStatusForPublicUser function and get its response.

To check if the request was successful use the hasNoErrors function. If the request itself or any child object does not have the status code "0", which is = success, this will return false.

Documentation

Support

License

This project is licensed under the MIT license. Please read the LICENSE file for details.


All versions of dhl-business-shipping with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-soap Version *
ext-curl Version *
ext-simplexml Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package christoph-schaeffer/dhl-business-shipping contains the following files

Loading the files please wait ....