Fairly straightforward wrapper for the Canada Post API. Forked from t3rminus/canada-post to add contract shipments and update dependencies.
Handles basic rating, creating shipments, and tracking.
API Documentation is available here.
To authenticate with canada post you need to create a developer account. Once you've done that they'll give you a username and password that are a string of numbers and letters:
- For users of this library, put those into the
new CanadaPostClient($USERNAME, $PASSWORD, $CUSTOMER_NUMBER);
- For development use, put those in a .env file in the root of the repo (
CPC_USERNAME
,CPC_PASSWORD
,CPC_CUSTOMER
).
If you forget to put your customer number in, you'll probably get 404 errors for some endpoints.