DivideBV / Postnl

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

Set Evening delivery #39

Closed stuiterbal1984 closed 7 years ago

stuiterbal1984 commented 7 years ago

Hi,

How can we set the Evening delivery trhough this api?

ameenross commented 7 years ago

You need to refer to the PostNL documentation. They maintain lists of product codes you need to use. See: https://developer.postnl.nl/apis/confirming-webservice/how-use and search for "evening delivery".

stuiterbal1984 commented 7 years ago

Thanks for your quick response,

i See there the productcode: 3385 Deliver to stated address But for a Standard shipment only stated address have the same productcode.

On the documentation stay: It is mandatory to use a combination of product code and a product option. The PostNL frontend will return this product option. Combine these product codes with the following product option:

Sow, how i do this?

ameenross commented 7 years ago

Use setProductOptions on the shipment.

$shipment->setProductOptions(new ComplexTypes\ArrayOfProductOption([
    new ComplexTypes\ProductOption(118, "007"),
]));