Download the PHP package richardhj/epost-api without Composer
On this page you can find all versions of the php package richardhj/epost-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download richardhj/epost-api
More information about richardhj/epost-api
Files in richardhj/epost-api
Package epost-api
Short Description E-POSTBUSINESS API PHP integration
License LGPL-3.0+
Informations about the package epost-api
E-POSTBUSINESS API PHP integration
This package provides an PHP integration of the E-POSTBUSINESS API.
Install
Via Composer
Usage
Authenticate user
First of all you have to fetch an AccessToken
instance by authenticating the user. I recommend to use this
OAuth2 Provider for fetching the access token.
Provide metadata
Envelope
We're going big steps forward and create a Letter
instance. The Letter
collects all metadata (envelope, delivery
options…), creates a letter draft on the E-POST portal and finally sends the letter.
Recipients
We created our envelope and we need to add the recipients. This is how for an electronic letter.
And this is how for a printed letter. For printed letters, only one recipient is valid!
Delivery options
We also define DeliveryOptions
as they define whether the letter is going to be colored and so on. This is for printed
letters only.
Finishing
We're going to start the communication with the E-POST portal.
Fetch postage info
If you wonder how expensive the letter is going to be.
Case 1: You already defined a letter with envelope and so on:
Case 2: You need to provide PostageInfo
:
Delete letters
If you already have a Letter
instance, deleting is that easy:
Otherwise you need to know the letterId
.
delete()
will delete the letter irrecoverably on the E-POST portal. You have to possibility to use moveToTrash()
otherwise.
License
The GNU Lesser General Public License (LGPL).
Contributing
Please follow the Symfony Coding Standards.
Beispiel-Konzept
Dieses Konzept erklärt die verschiedenen Komponenten, die im Rahmen einer E-POSTBUSINESS-Integration für das CMS Contao genutzt wurden.