This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
There is no license information available for the latest version (dev-master) of this package.

This bundle provides integration with ECONT Courier. Module is based on Bozhidar Hristov's vm/econt.




Installs: 31

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 5


dev-master 2018-03-15 05:29 UTC

This package is not auto-updated.

Last update: 2021-06-12 12:03:14 UTC


PHP Component to integrate with ECONT Courier

So far only calculation is possible.

$guzzle = new \GuzzleHttp\Client();
$client = new \Todstoychev\Econt\Client($guzzle, true, 'demo', 'demo');

$parcelRequest = new \Todstoychev\Econt\Request\ParcelRequest();

$loading = new \Todstoychev\Econt\Model\Loading();

$sender = new \Todstoychev\Econt\Model\Sender();

$receiver = new \Todstoychev\Econt\Model\Receiver();

$shipment = new \Todstoychev\Econt\Model\Shipment();


/** @var \Todstoychev\Econt\Response\ParcelResponse $response */
$response = $client->execute($parcelRequest);

foreach ($response->getParcelResults() as $parcelResult) {
    if ($parcelResult->hasError()) {
        echo 'Грешка: ';
        foreach ($parcelResult->getError()->getMessages() as $errorMsg) {
            echo $errorMsg;

    } else {
        echo 'Цена за доставка '.$parcelResult->getLoadingPrice()->getTotal().' '.$parcelResult->getLoadingPrice()->getCurrency()->getName();

Example output with error:

Грешка: получател: Не е намерено населено място с пощенски код 80001

Example output without error:

Цена за доставка 7.8 лв