postnl / postnl-magento2

This is the official Magento 2 extension for the logistics company PostNL. Add shipping options and parcelshops to your checkout. Create labels with track and trace functionality from the backend.
58 stars 61 forks source link

[QUESTION] Please summarize your question here #347

Closed bartlubbersen closed 1 year ago

bartlubbersen commented 1 year ago

Question For a customer I want to be able to reproduce a bug locally, however whenever I put the PostNL module in test mode (with the correct credentials from your article), I am receiving errors.

  1. First during the checkout the address validation doesn't work, it's telling me the API key is invalid, however I did check and it is sending the API key you describe in your article for testing.
  2. Whenever I try to create a shipping label I am receiving an error from the API:
    <s:Body>
    <s:Fault>
      <faultcode>s:CIF Framework Message Interceptor</faultcode>
      <faultstring xml:lang="en-US">Check CIFException in the detail section</faultstring>
      <detail>
        <CifException xmlns="http://postnl.nl/cif/services/common/">
          <Errors>
            <ExceptionData>
              <Description i:nil="true"/>
              <ErrorMsg>Validation failed for shipment: 3STOTAxxxxxxxxx, Messages:
                3STOTAxxxxxxxxx: {[25001]
                Both kenmerksrt and optionsrt are mandatory for a valid ProductOption}
            </ErrorMsg>
              <ErrorNumber>25001</ErrorNumber>
            </ExceptionData>
          </Errors>
        </CifException>
      </detail>
    </s:Fault>
    </s:Body>

I tried upgrading to the latest version, but still get this error. I also compared the request body with one on production, they are the same besides some differences in values. And on production this is working correctly.

The address validation not working isn't a big problem, but creating shipping labels should work correctly in test mode am I right?

tig-jeffreybranderhorst commented 1 year ago

Hi @bartlubbersen ,

That the address validation does not work in test mode we are aware of, but you should be able to print labels, I have just tested this on our test environment, and we are able to print labels. Could you contact support via digitaleklantsupport@postnl.nl, so we can investigate this further on your system?

Have a great day, Jeffrey