Closed timramakers closed 5 years ago
Hey, thanks for your kind words! I'm hoping this project will soon abstract away the difficult API methods that PostNL provides, kind of like what Omnipay is to payment gateways.
Do you have any idea on how to fix this?
I'm not sure yet. I have paused this project for the moment since the new PostNL API doesn't seem to be stable enough to use in production. PostNL seems to have made some last-minute changes as well. I'll be rebooting this project from next week. Let's see if we have to change things in this method. Despite this library having alpha status, I am currently using it in production together with the (legacy) SOAP API.
Can you send me the original request (anonymized if necessary)? I bet the info around char 2416 can tell us more.
Thanks so much for your reply! Can you instruct me in how to get the original request? I've been digging through the source but not sure where to print, echo or dump the request contents.
The request is sent to the HttpClient (cURL or Guzzle). You can dump the $body
param in:
https://github.com/thirtybees/postnl-api-php/blob/fd6856b8d31a059531135298d246b1ba44f64f21/src/HttpClient/CurlClient.php#L194 for a single request
or
https://github.com/thirtybees/postnl-api-php/blob/fd6856b8d31a059531135298d246b1ba44f64f21/src/HttpClient/CurlClient.php#L332
when it's part of a multi-request.
Hope that helps!
Perfect, thanks! I have sent the request to PostNL because it looked perfectly fine, and they found a bug on their side and fixed it, so we made the internet a little bit better today. ;-)
Thanks a bunch!!
Before I start: thank you for writing this brilliant set of bindings!!
I'm using a piece of code derived from the readme example and that works perfectly. After switching out of the sandbox mode, I get the following error:
Evaluation of XSL removeNamespace.xsl failed with reason: "Process instruction target name cannot be xml at line 3 (possibly around char 2416)
This tells me that something is wrong in the data being sent, but I'm not sure how to fix it. My code looks as following:
Do you have any idea on how to fix this?