The real time rate works ok for packages but not for letters.
It appears to be because dimensions are sent for letters, this conflicts with the api specification (linked). I have reviewed logic of app/Tygh/Shippings/Services/Aup.php and this sends dimension for both letters and packages packages = required letters = invalid
to replicate
set up a real time postage method to a package type.
set product box dimensions to minimum e.g. 1 x 1 x 1
Test requests sent to Australia Post from the storefront and from the admin panel (when using “test”) use the same data structure, so there should be no difference. Please check that all other settings are correct.
I don’t believe the test structure sends dimensions, which is why I think the live provides an error, whatever the reason it doesn’t work when letters are selected but does work when package selects. The item being tested from storefront (as opposed to test calculation within admin panel) weight is set too 0.05 and length of 1x1x1
You can check the last HTTP/HTTPS requests at the Administration > Logs page of your admin panel. It will contain both the parameters that were sent in the request and its response.
Ta. Both the admin panel test and cart request seem to include dimensions. It seems the bug is that the weight is being sent as 250kg for the letter but .250kg for the package … that said it works ok for the admin panel test. Saids that service code is wrong, but it is the same service code for the admin panel test!!! Maybe it is that the cart test adds a decimal point and the admin panel test doesn’t.
Letter no work
Requests (Shipping request) URL:https://digitalapi.auspost.com.au/postage/letter/domestic/calculate.json Request: array ( ‘country_code’ => ‘AU’, ‘service_code’ => ‘AUS_LETTER_REGULAR_LARGE_500’, ‘weight’ => 250.0, ‘from_postcode’ => ‘5114’, ‘to_postcode’ => ‘5114’, ‘length’ => 1, ‘width’ => 1, ‘height’ => 1, ) Response: {“error”:{“errorMessage”:“Please enter a valid Service code.”}} Shipping: aup
Package works
Requests (http/https request) URL:https://digitalapi.auspost.com.au/postage/parcel/domestic/calculate.json Request: ‘country_code=AU&service_code=AUS_PARCEL_REGULAR_PACKAGE_SMALL&weight=0.25&from_postcode=5114&to_postcode=5000&length=1&width=1&height=1’ Response: {“postage_result”:{“service”:“Small”,“delivery_time”:“Delivered in 2-3 business days”,“total_cost”:“10.60”,“costs”:{“cost”:{“item”:“Small”,“cost”:“10.60”}}}}
Admin panel test (works)
Requests (http/https request) URL:https://digitalapi.auspost.com.au/postage/letter/domestic/calculate.json Request: ‘country_code=AU&service_code=AUS_LETTER_REGULAR_LARGE_500&weight=500&from_postcode=5114&to_postcode=5000&length=10&width=10&height=10’ Response: {“postage_result”:{“service”:“Large Letter”,“delivery_time”:“Delivered in 2 to 3 business days, dependent on point of origin and destination”,“total_cost”:“6.00”,“costs”:{“cost”:{“item”:“Large Letter”,“cost”:“6.00”}}}}
I’m sorry but I am unable to find any messages from my colleagues that they confirm this bug in the Help Desk.
You have selected Domestic Letters: Large Letter 500g and are attempting to calculate shipping for a weight of 250 grams.
In summary, the Australia Post shipping method is working as intended and no bugs have been found at this time. For further assistance on this topic, please either contact us via Help Desk with an active Customer Care subscription, or contact Australia Post Support.
I’m closing this topic.
Big CS-Cart Update is Here
Experience the New Admin Panel with Dark Theme