Download the PHP package vesselind/econt-integration without Composer
On this page you can find all versions of the php package vesselind/econt-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vesselind/econt-integration
More information about vesselind/econt-integration
Files in vesselind/econt-integration
Package econt-integration
Short Description PHP library for Econt API integration - Bulgarian delivery company
License MIT
Informations about the package econt-integration
PHP Econt Integration Library
A standalone PHP library for integrating with Econt Delivery Services API. Designed to be reusable across multiple projects and fully compatible with PHP 8.2+, Symfony 6/7/8, and any PSR-18 HTTP client.
Features
- π¦ Shipment management β create, confirm, update, cancel labels
- πΊοΈ Address data β countries, cities, streets, quarters, address validation
- π’ Office / Econtomat lookup β with filtering by country and city
- π° Price calculation β real-time shipment cost estimates
- π Courier requests β schedule pickups
- π¬ Return & delivery instructions β configurable courier/return instructions
- π Dual HTTP adapter β Symfony HttpClient (default) or any PSR-18 client
- π§© Typed model objects β all requests and responses map to strongly-typed PHP classes
- β PHPStan level 6 + PSR-12 compliant
Requirements
| Dependency | Version |
|---|---|
| PHP | >= 8.2 |
| symfony/http-client | ^6.0 \| ^7.0 \| ^8.0 |
| psr/http-client | ^1.0 |
| psr/http-factory | ^1.0 |
| nyholm/psr7 | ^1.8 |
Installation
Quick Start
Standalone (any PHP project)
With Any PSR-18 Client
Symfony DI Wiring
Usage
Address Service
Office Service
Delivery Routing
The delivery route is determined by which address/office fields you fill in:
| Sender side | Receiver side | tariffSubCode |
|---|---|---|
senderAddress |
receiverAddress |
DOOR_DOOR |
senderAddress |
receiverOfficeCode |
DOOR_OFFICE |
senderOfficeCode |
receiverAddress |
OFFICE_DOOR |
senderOfficeCode |
receiverOfficeCode |
OFFICE_OFFICE |
The office code is the
codefield from theOfficemodel returned bygetOffices().
Door-to-office (receiver picks up at an Econt office)
Office-to-office
How to find an office code
Shipment Service β Price Calculation
Shipment Service β Create & Cancel Label
Shipment Service β Other Operations
Model Reference
Key Models
| Model | Namespace | Description |
|---|---|---|
Country |
Model\Location |
Country with ISO codes, currency, phone code |
City |
Model\Location |
City with post code, municipality, geo coords |
Street |
Model\Location |
Street name (BG + EN) |
Quarter |
Model\Location |
City quarter/district |
Address |
Model\Location |
Full address with city, street, num, geo |
ValidatedAddress |
Model\Location |
Address extended with validationStatus |
Office |
Model\Office |
Econt office or Econtomat with full details |
ShippingLabel |
Model\Shipment |
Complete shipment label with all parameters |
ClientProfile |
Model\Shipment |
Sender or receiver contact details |
ShippingLabelServices |
Model\Shipment |
Additional services (COD, insurance, SMSβ¦) |
ReturnInstructionParams |
Model\Shipment |
Return instructions configuration |
PackingListElement |
Model\Shipment |
Item in a packing list |
PriceResult |
Model\Result |
Calculated price with currency |
Country Factory Methods
Country ships with built-in factories for the most common Econt markets:
Use them anywhere a Country instance is needed β for example when building a City for a request payload:
Enums
Array Serialisation
Every model supports toArray() / fromArray() using the original Econt API key names:
Exception Handling
Running Tests
Demo credentials used in integration tests:
iasp-dev/1Asp-devagainsthttps://demo.econt.com/ee/services
Project Structure
Configuration Reference
| Constant | Value |
|---|---|
EcontConfiguration::PRODUCTION_URL |
https://ee.econt.com/services |
EcontConfiguration::DEMO_URL |
https://demo.econt.com/ee/services |
License
MIT License. See LICENSE for details.
All versions of econt-integration with dependencies
symfony/serializer Version ^6.0|^7.0|^8.0
symfony/property-access Version ^6.0|^7.0|^8.0
symfony/property-info Version ^6.0|^7.0|^8.0
symfony/http-client Version ^6.0|^7.0|^8.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/log Version ^3.0
nyholm/psr7 Version ^1.8