Magento 1.2.0.1 Fails when using Google Checkout Merchant Calculated Shipping Callbacks: An HTTPS URL is required.

January 8, 2009

Long time, no post – busy time with Christmas and New years. I went to Mahia Beach on the east coast of New Zealand, amazing place – I was lucky enough to swim with a wild dolphin named Moko, he stole someones boogie board too!

Anyway, to more nerdy subject matter, I recently upgraded our Magento webstore to version 1.2.0.1 – it was relatively painless except for one major hiccup. There seems to be a bug with the configuration scopes in the new version of Magento that means the HTTPS URL is not propagating to the webstore from the default configuration scope.

The problem manifests itself as your Google Checkout merchant calculated shipping callback failing (and subsequently using the default amount). There is a message in the Google checkout integration console:

URL you are using for merchant calculations is not valid or is not https http://www.yourdomain.com/googlecheckout/api/ — the error we got is: An HTTPS URL is required.

As you can see the non-secure http URL is being passed to Google, which in turn being rejected as Google requires https for production callbacks. You can use non-secure URL’s only with the Google Checkout sandbox.

The problem is detailed in this thread on the magento forums the solution there is to specify the secure URL at the store level. I followed the steps through, but it took me a couple of goes at it to make sure I had it right. I thought it would be beneficial to document my steps, with some screenshots, so others can follow it through easier.

Firstly you need to specify your secure URL in both the Base and Base Link fields, also make sure you choose ‘Yes’ for ‘use secure URL’s in frontend’.

The default configuration for URLs accessed at System>Configuration>Web

The default configuration for URLs accessed at System>Configuration>Web

Next in the top left corner Configuration scope selector drop-down you should see the default scope, the website scope and the webstore scope.

The configuration scope selector which should be on default to start with.

The configuration scope selector which should be on default to start with.

You’ll want to select the last option in the list (or each leaf if you have more than one store).

Choose the last option in the list, which will be your webstore(s)

Choose the last option in the list, which will be your webstore(s)

On this configuration screen you will need to untick the ‘Use Website’ tick boxes and put in your own values (even though they are the same as the default). You can see what I had to do in the screenshot below. Don’t forget to put in the http URL, otherwise you will end up with https all over your site which will be slower.

The configuration at the webstore level, it's the same as the default.

The configuration at the webstore scope, it is the same as the configuration at the default scope.

After doing all of that you should be up and running, Google checkout will now use the secure https URL for its merchant calculation callback and the rest of your site should stay on http.

Ashley

Posts

Hi! I'm Ashley Schroder, a Software Engineer from New Zealand - this is a collection of notes on my experiences with Ecommerce Web Development, particularly Magento Development.

Are Your Customers Getting The Magento Emails You Send?

MageSend Magento Email sending with Amazon SES

I have made a premium Magento Extension called MageSend. MageSend makes it simple and easy to send using Amazon's highly reliable SES email service.

The extension is $99, and comes with a complete money back guarantee, please check it out, I am confident it will resolve any email sending problems with your Magento store.

4 responses to Magento 1.2.0.1 Fails when using Google Checkout Merchant Calculated Shipping Callbacks: An HTTPS URL is required.

  1. This also fixes the mozilla firefox problem on the one page check out where it was showing the page only partly secure. Now with these steps it’s fully secure. THANK YOU.

  2. Any idea if this is necessary in version 1.2.1.1?

  3. Hi, Ben

    I’m not sure to be honest – I haven’t merged in the new code yet.

    I’d suggest testing the upgrade in a dev environment, but if you’re like me your dev environment won’t have https!

    You can do an immediate self-test (by going through to Google Checkout and seeing if your shipping price is there) after an upgrade and then quickly roll back if it does fail (don’t forget to backup your database).

    If you do this please let us know what you find out.

    Cheers,
    Ashley

    PS: I’ll be upgrading Magento again shortly so I’ll post on my findings when I do.

  4. You rock!! Thanks so much!!