DivideBV / Postnl

Library to connect to PostNL's SOAP service called CIF
GNU General Public License v2.0
31 stars 40 forks source link

Switch to new API platform #58

Closed slokhorst closed 6 years ago

slokhorst commented 6 years ago

This is a breaking change. The DivideBV\Postnl\Postnl constructor no longer accepts a username and password, but a single API key.

Please test all services, as I don't have access to everything.

For more information, see #55 and https://developer.postnl.nl/apis/new-api-platform

As this is a breaking change, it might be a good time to incorporate #32

slokhorst commented 6 years ago

People moving from the old platform to the new, need to request an API key at https://developer.postnl.nl/content/request-api-key

ameenross commented 6 years ago

So until they provide proper information on upgrading, I'm not going to take action here. I cannot justify the hours needed to sort everything out without an upgrade guide (unless we get budget from one of my company's clients for it).

I'm worried for example that not all services work with the new authentication method without upgrading to a newer version.

The only thing I can do without an upgrade guide is facilitate. If the community can test whether this works with every CIF service currently supported, then we can proceed.

slokhorst commented 6 years ago

FYI: I just got an email from PostNL that they will shut down the old endpoint on 1 November 2018.

screenshot_2018-06-28 wij zijn postnl en we hebben iets voor je postnl

ameenross commented 6 years ago

Good timing. I have an upcoming meeting with a customer where this can be discussed. Do they now have an upgrade guide?

slokhorst commented 6 years ago

They have this Migration guide.

ameenross commented 6 years ago

It links to a PDF, but the link doesn't even work.

slokhorst commented 6 years ago

Works for me: step-by-step-guide-API-platform_tcm85-123489.pdf

annuh commented 6 years ago

It's only 3 months until 1 November 😀 Can we help testing this?

slokhorst commented 6 years ago

You can test it out by adding this to your composer.json:

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/slokhorst/Postnl"
    }
]

change the line in "require" to "dividebv/postnl": "dev-new_api_platform" and run composer update.

Now request an API key at https://developer.postnl.nl/request-api-key/ and use that in your new Postnl(...) call (see updated readme).

ameenross commented 6 years ago

I'm working on getting some time for this from the client. The PR looked good at first glance, but of course I need a bit more time to properly verify it. I hope to get this time soon

ameenross commented 6 years ago

I'm worried about this statement on the page to request an API key.

Dependent on which APIs you would like to use, you need separate keys for each API

Otherwise, I'm working on getting this merged today. But I won't release a stable 2.0 yet until we know what's going on with the multiple API key thing.

slokhorst commented 6 years ago

I think that's incorrect. I have a single key for multiple APIs:

image

Edit: maybe you need a separate key for the paid APIs (IBANcheck, Kredietcheck, etc)?

ameenross commented 6 years ago

We'll need to figure out the details I guess... It would be no fun if Postnl::__construct needs to request an array of api keys.

ameenross commented 6 years ago

2.0.0-beta1 released