verbb / postie

A Craft Commerce shipping calculator plugin.
Other
12 stars 18 forks source link

Canada Post - Wrong endpoint in production #25

Closed alexgilbertDG closed 4 years ago

alexgilbertDG commented 4 years ago

Description

Here the error I got when i'm in production: 2020-03-10 16:55:12 [-][1][-][error][postie] Canada Post: API error: There is a mismatch between the endpoints and the authorization. Please ensure production keys are used with production endpoints and development keys are used with development endpoints..

If you look into the canada post documentation the endpoint should be: https://soa-gw.canadapost.ca but your endpoint is hardcoded to the dev API URL (https://ct.soa-gw.canadapost.ca). Here: /providers/CanadaPost.php:157

More info here: https://www.canadapost.ca/cpo/mc/business/productsservices/developers/services/fundamentals.jsf#ProductionEnvironment

Steps to reproduce

  1. Make a postie request with Canada Post production Key API

Additional info

engram-design commented 4 years ago

Fixed in 2.1.2