0

after fixing issue in: Demac Canada Post Plugin - "Cannot connect to host"

Within a month we started to get error

"AAA Authentication Failure"

Error code on Canada Post site is explained as:

"The API key for the request is invalid. Please double check your inputs."

https://www.canadapost.ca/cpo/mc/business/productsservices/developers/messagescodetables.jsf

We have checked the API keys and they are the correct ones (I re-grabbed them from the API key page just in case and even tried to go through Demac Wizard and grab it that way).

WHY ERROR HAPPENS

Canada Post developers told us that this error is being triggered when we submit incorrect credentials 3 times, then the account gets disabled for 10 minutes and then it comes back on.

It is weird though, because the rates are shown for a few requests and then the error shows up - completely randomly. I would assume that rates would not be shown if we were submitting wrong ones.

So the rates are correct, but then not?

REQUEST LIMIT?

We have now 400 requests / minute with our account on Canada Post. So its probably not the request limit.

LOGGING API KEYS

I also tried logging API keys that were being sent with the SOAP request and they are correct.

I'm not sure what else I could do.

Did anybody experience this?

======== UPDATE ===============

Here are the contents of the SOAP request:

(
    [UsernameToken] => SoapVar Object
    (
        [enc_type] => 301
        [enc_value] => stdClass Object
            (
                [Username] => SoapVar Object
                    (
                        [enc_type] => 101
                        [enc_value] => 11111111111111111
                        [enc_namens] => http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
                    )

                [Password] => SoapVar Object
                    (
                        [enc_type] => 101
                        [enc_value] => 11111111111111111
                        [enc_namens] => http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
                    )

            )

        [enc_namens] => http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
    )

[Platform-Id] => SoapVar Object
    (
        [enc_type] => 301
        [enc_value] => 1111111111111
        [enc_namens] => http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
    )

)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.