Mity Docs Mity Docs for Mity Digital
Australia Post Shipping for Simple Commerce Documentation

Installation

Requirements

The Australia Post Shipping Methods for Simple Commerce addon requires requires:

  • Statamic 4

  • Simple Commerce 5

  • PHP 8.2

For Statamic 3 and Simple Commerce 3/4, please refer to the 1.x release. This branch is no longer supported. You should update your site to Statamic 4 and Simple Commerce 5. The docs for 1.x and 2.x do remain the same, as of this time.

Installation

This assumes you have Statamic and Simple Commerce installed and ready to go.

To get started, run the following command from your project root:

1composer require mitydigital/simple-commerce-australia-post

You will need to make changes to the config file, so publish that while you're at it:

1php please vendor:publish --tag=simple-commerce-australia-post-config

First up, go to the newly published /config/simple-commerce-australia-post.php file and set your from_postcode. This must be set before you can perform any interactions with the Australia Post PAC API.

To use the Australia Post PAC you will need an API key. You can register for an API key at Australia Post's website.

When you have your API key, add it to your .env file:

1AUSTRALIA_POST_PAC_KEY=YOUR_API_KEY