Hi,
I did really many tests and together with DHL support from Germany, and I came out with these results.
Maybe this plugin was developed for another country (?), but to work in Germany it needs:
two additional fields for the authentication
API url is different from the pre-configured
Product codes are also different from the pre-configured
Here in short what is needed for the authentication and the correct API url:
curl --location '
api-eu.dhl.com/parcel/de/shipping/v2
' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_id=(API's username OK)' \
--data-urlencode 'client_secret=(API's password OK)' \
--data-urlencode 'username=(Missing field username)' \
--data-urlencode 'password=(Missing field password)'
Example of Germany’s products code.
array('key' => 14, 'code' => 'V01PAK', 'name' => 'DHL Paket'),
array('key' => 15, 'code' => 'V53WPAK', 'name' => 'DHL Paket International'),
array('key' => 16, 'code' => 'V54WPAK', 'name' => 'DHL Europaket'),
array('key' => 17, 'code' => 'V62KP', 'name' => 'DHL Kleinpaket'),
array('key' => 18, 'code' => 'V66WPI', 'name' => 'Warenpost International'),
Would it possible to
- add the missing field for the authentication (username and password) ?
- change the API url field (or make it configurable from the user) ?
- change the shipping code (or make them configurable from the user) ?
Thanks again!