Download the PHP package baltpeter/internetmarke-php without Composer
On this page you can find all versions of the php package baltpeter/internetmarke-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download baltpeter/internetmarke-php
More information about baltpeter/internetmarke-php
Files in baltpeter/internetmarke-php
Package internetmarke-php
Short Description A simple PHP wrapper for the Deutsche Post Internetmarke web service
License MIT
Informations about the package internetmarke-php
internetmarke-php – Simple PHP wrapper for the Internetmarke API
Simple PHP wrapper for the 1C4A (“OneClickForApplikation”) web service for the Internetmarke provided by Deutsche Post (DPAG).
This project’s main purpose is to be able to order Deutsche Post stamps directly from your own applications. The payment is handled via the Portokasse, a prepaid wallet service also by Deutsche Post.
The web service by Deutsche Post is a custom SOAP API (see the WSDL here: https://internetmarke.deutschepost.de/OneClickForAppV3?wsdl). This project aims to abstract the SOAP nature away and provide a PHP API, while still adhering to the structure defined by DPAG. Do note that this is only a very thin wrapper around the SOAP API and the user still has to follow DPAG’s specification.
Requirements
To access the web service, you will need to register as a partner with DPAG. This can either be done via their website (German only) or by contacting [email protected]. They ask you to fill out following form. So keep in mind to fill it out first. (German only).
They will send you the documentation for the web service and create your personal credentials (consisting of: your partner ID, a secret key called SCHLUESSEL_DPWN_MARKTPLATZ
, and a key phase which is usually 1
).
In addition, you will need to have an account for the Portokasse service. This is a prepaid wallet from which your purchase totals will be deducted.
After registering, you can access the service with your username (email address) and password.
Installation
The package is available via Composer. To install the latest version from Packagist, run:
Basic Usage
All actions provided by the web service are implemented in the baltpeter\Internetmarke\Service
class.
This example shows you how to order a single stamp for a domestic letter. Other actions and parameters are documented with phpDoc. For more examples, please refer to the wiki.
Running this code will print a result similar to this:
Note how we wrapped the $order_item
in an array. If you want to order multiple stamps, just include more OrderItem
s in that array.
The stamp in the linked PDF will look something like this:
Again, please refer to the wiki for more examples.
License
internetmarke-php is licensed under the MIT license, see the LICENSE
file for details. Pull requests are welcome!