Looking to hire Laravel developers? Try LaraJobs

laravel-dpd maintained by sergeevpasha

Description
Tiny DPD API wrapper for Laravel
Author
Last update
2024/03/12 17:56 (dev-dependabot/github_actions/actions/checkout-4.1.2)
License
Links
Downloads
1 853
Tags

Comments
comments powered by Disqus

Maintainability Test Coverage CodeFactor Generic badge Generic badge

IMPORTANT UPDATE

DPD made lots of changes, so the best way I see it is having DPD API as a service, so starting from now on this package will have only a few basic functionality required for it, consider using it (will be available later) instead.

Laravel DPD API Wrapper

Allows you to:

  • Get all DPD cities
  • Get all DPD Terminals
  • Calculate a delivery

Pre-requirements

You need to get DPD API key, user, login and password. Key can be obtained in your cabinet at https://www.dpd.ru/ols/order/personal/integrationKey.do2

Installation

Configuration

This package has a few configuration values:

After installing, you may just import the client

Now we can use these methods:

Delivery Object

To build a Delivery object you will need to pass an array to fromArray() method just like that:

Available countries

If you need to specify a country you need to use one of these codes:

Available services

If you need to specify a service you need to use one of these codes: