Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Posts
    9
    Plugin Contributions
    0

    Default Auspost Shipping Module with new AusPost API

    Hi All,

    For those who are not aware AusPost are killing the old drc.edeliver.com.au/ratecalc.asp rate calculator and have introduced a new API.

    No one at Auspost can tell me when this new API will be the only avenue to obtain Auspost shipping quotes.

    I have been using the free auspost contribution for a few years. It works well.

    Recently Auspost made a DNS change and the old api stopped reporting delivery times. By point directly at the old IP address this as a workaround has worked well. IP = 155.144.24.22

    The new API from Auspost is a bit more complex and requires a personal ID Key to be embeded in the URL Via CURL. After working this out it does seem to work with a few glitches.

    No shipping days are returned, and the US $9 tax on items over .5kg is not being calculated.


    Documentation available here: http://auspost.com.au/devcentre/asse...3-20110929.pdf

    Finally to my question:

    Has anyone integrated the new auspost API into the free auspost shipping module.

    While it is not rocket science i would hate to re-invent the wheel.

    To use the api you must register and get a personal id.

    Then Simple PHP to access the site is:

    <?php
    function get_auspost_api($url)
    {
    $crl = curl_init();
    $timeout = 5;
    curl_setopt ($crl, CURLOPT_HTTPHEADER, array('AUTH-KEY:<PUT YOUR KEY HERE>'));
    curl_setopt ($crl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt ($crl, CURLOPT_URL, $url);
    curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
    $ret = curl_exec($crl);
    curl_close($crl);
    return $ret;
    }

    //International Air parcel postage calculation example)
    $auspost_xml = get_auspost_api(
    "https://auspost.com.au/api/postage/parcel/international/calculate.xml?&country_code=US&weight=.49&service_code=INTL_SERVICE_AIR_MAIL&ext ra_cover=");

    //Do XML stuff

    $xml = simplexml_load_string($auspost_xml);

    echo $xml->getName() . "<br />";

    foreach($xml->children() as $child)
    {
    echo $child->getName() . ": " . $child . "<br />";
    }
    echo $xml->service . "\n";



    ?>

  2. #2
    Join Date
    Dec 2005
    Posts
    64
    Plugin Contributions
    1

    Default Re: Auspost Shipping Module with new AusPost API

    Did you ever implement this into your Auspost shipping module? I was about to do this myself when I found your thread.

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Auspost Shipping Module with new AusPost API

    Quote Originally Posted by Whiterabbizt View Post
    Hi All,
    For those who are not aware AusPost are killing the old drc.edeliver.com.au/ratecalc.asp rate calculator and have introduced a new API.
    Also for those that are not aware, these changes will have no effect on the ozpost module. The ozpost servers already make use of the new API (and have done since last september).

    Quote Originally Posted by Whiterabbizt View Post
    The new API from Auspost is a bit more complex and requires a personal ID Key to be embeded in the URL Via CURL. After working this out it does seem to work with a few glitches.

    No shipping days are returned, and the US $9 tax on items over .5kg is not being calculated.
    The ozpost modules continue to supply both the estimated shipping days (and/or date), as well as including the $9.00 USA Security surcharge (not a tax) when applicable. Merchants with many shipments to USA should take note of this. It'll only take a dozen orders being underquoted by this $9.00 surcharge to pay for a full year subscription to the ozpost servers. Your support will also ensure the continuing survival of the ozpost.net project. Something that can't be said for the alternative offering (which is just a hack of my code anyway).

    Quote Originally Posted by Whiterabbizt View Post
    While it is not rocket science i would hate to re-invent the wheel.
    This would be the 3rd time this particular 'wheel' has needed to be re-invented. The first was a port from the oScommerce module (done before my time). Due to AustPost changes this was broken for almost six months before I re-invented it as "AustPost - Improved", and now just few years later it needs to be reinvented once again. Will you be around to 're-invent' it yet again in another few more years?

    Anyway, before you start working to on this new wheel, you should probably discuss things with "Avant Marketing". They are the people that hacked my code the last time so as to circumvent the ozpost subscription servers, and after checking our daily logs I see that they are already looking at some of my latest code, assumedly to do the same thing.

    Whilst I have no objection to this (After all, I DO release the ozpost client modules under the GPL licence) I would also urge people to look towards the longer term benefits of supporting the ozpost servers (and the client modules that I've developed for it). Australia is a VERY SMALL market, with just a couple of hundred *active* merchants at any given time. Only a fraction of those support the ozpost.net project, which is still commercially non viable (after 2 years), and is the reason why I've had to resort to creating client modules for other shopping carts, rather than spending time adding more carriers to the existing offereings, which is what I'd rather be doing. (For those that are not aware, the ozpost servers supply real time quotes from not only Australia Post, but also TNT, FastWay, Trandirect and e-Go couriers).

    Anyway, sorry if this sounds like an advert. I don't/didn't intend it to be that way. I just like it to be known that ozpost has/was made compatible with the new Australia Post API six months ago, and I for one am not at all surprised that it has taken until now (when things have started to break) before *anyone* has shown the slightest bit of interest in updating the 'free' module. Is this the situation that you really want to find yourselves in, again, and again, and again?

    To the few dozen Zenners that are currently supporting the ozpost project, I thank you.

    Cheers
    Rod.

  4. #4
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    7
    Plugin Contributions
    0

    Default Re: Auspost Shipping Module with new AusPost API

    Hello All,
    The paid version works very well and has the enhanced features of TNT, Fastway and eGo
    Hence why we support Rod with our own and our customers sites we look after.
    Thanks Rod.
    Dave

 

 

Similar Threads

  1. Probelm with AusPost Shipping Module
    By CoolTech in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 3 Sep 2009, 10:30 PM
  2. AusPost Shipping Module Request
    By chris20492002 in forum Addon Shipping Modules
    Replies: 16
    Last Post: 21 May 2007, 02:02 AM
  3. AusPost Shipping Module help
    By gate13 in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 21 Jan 2007, 07:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR