DivideBV / Postnl

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

add CL as accepted barcode #69

Closed phamels closed 6 years ago

phamels commented 6 years ago

When trying to ship to Mexico, it generates a barcode with CL prefix which is not yet accepted.

ameenross commented 6 years ago

Can't find it on the products page. Reference?

phamels commented 6 years ago

Calling generateBarcodeByDestination("MX") calls generateBarcode("CL") DivideBV\Postnl\Postnl::generateBarcodeByDestination("MX") --> DivideBV\Postnl\Postnl::generateBarcode("CL") --> DivideBV\Postnl\Exceptions\InvalidBarcodeTypeException : 'CL' is not a valid barcode type.

Immediate reference not found (not to my surprise) at PostNL, attempted to call them to confirm without response, will call again in the afternoon. If added to the array, label gets generated, plus API is providing shipping status feedback on the barcode.

ameenross commented 6 years ago

That depends on the GlobalPack parameter you passed to the constructor. CD1234 Is it really CLxxxx in your case?

phamels commented 6 years ago

Yes, I did receive a CLxxxx in my case:

Barcode: DivideBV\Postnl\ComplexTypes\GenerateBarcodeResponse {#662

#Barcode: "CL719xxxxxxNL"
ameenross commented 6 years ago

Well you received a barcode all right, I tried and I could get a CL as well. Trying an arbitrary barcode type (XX) yields a HTTP Unauthorized.

I guess I'll accept, but it's really odd that it's not listed even on PostNL's product page...

phamels commented 6 years ago

Thanks for the approval, PostNL also approved the API calls from sandbox today including these barcodes. Is it possible to add another tag v2.0.0-beta3 with this change included?

ameenross commented 6 years ago

Sure. Pushed

phamels commented 6 years ago

Thanks a lot!