DivideBV / Postnl

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

Old API shutdown november 2018 #67

Closed mro95 closed 5 years ago

mro95 commented 6 years ago

The old PostNL API will be migrated at 1 November 2018. One of the big changes is that the username and password will be replaced by an API key. Is the 2.0 branch stable enough?

ameenross commented 6 years ago

It's stable. The problem is that the PostNL server side is not stable because they changed more than just the auth. Check recent open issues for more info

They acknowledged the issue, so awaiting feedback.

PaulVanDeKamer commented 6 years ago

Hallo,

Ik maak gebruik van de "oude" omgeving en zou willen overstappen naar de nieuwe.... Heb hiervoor even een "test" omgeving gemaakt maar krijg deze niet aan de gang.

PHP message: PHP Fatal error: Uncaught DivideBV\Postnl\ComplexTypes\CifException in ./Postnl/src/Postnl.php:578

Heb het vermoeden dat dit komt door de apikey of de combinate welke niet juist is maar krijg dit niet 123 boven water. Hoe kan ik checken of de gegevens welke van Postnl afkomstig zijn correct zijn?

ameenross commented 6 years ago

PHP message: PHP Fatal error: Uncaught DivideBV\Postnl\ComplexTypes\CifException in ./Postnl/src/Postnl.php:578

Catch the exception and print the message. It will tell you what PostNL thought was wrong with your request.

PaulVanDeKamer commented 6 years ago

PHP message: PHP Fatal error: Uncaught DivideBV\Postnl\ComplexTypes\CifException in ./Postnl/src/Postnl.php:578

Catch the exception and print the message. It will tell you what PostNL thought was wrong with your request.

This is the complete stacktrace:

[Wed Oct 17 15:08:55.469213 2018] [proxy_fcgi:error] [pid 32459] [client 95.97.13.114:55222] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught DivideBV\Postnl\ComplexTypes\CifException in /Postnl/src/Postnl.php:581\nStack trace:\n#0 /Postnl/src/Postnl.php(236): DivideBV\Postnl\Postnl->call('BarcodeClient', 'generateBarcode', Object(DivideBV\Postnl\ComplexTypes\GenerateBarcodeMessage))\n#1 /Postnl/src/Postnl.php(270): DivideBV\Postnl\Postnl->generateBarcode('3S', 'TXTQ', 1118824, '000000000-99999...', false)\n#2 /test.php(60): DivideBV\Postnl\Postnl->generateBarcodeByDestination('NL')\n#3 {main}\n thrown in /Postnl/src/Postnl.php on line 581\n'

I am not sure where to Catch the exeption.

In the meanwhile.... string(41) "The apikey is not authorized for this api"

PaulVanDeKamer commented 6 years ago

In the meanwhile.... string(41) "The apikey is not authorized for this api"

mro95 commented 6 years ago

In the meanwhile.... string(41) "The apikey is not authorized for this api"

So their auth server is not working yet? And they want to stop the old API server. Lekker dan...

Soetens commented 6 years ago

So their auth server is not working yet? And they want to stop the old API server. Lekker dan...

Their new authentication is working for at least 4 months now. I think you use the wrong API key. (if you did not update everything, the endpoints are also changed)