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 184.108.40.206 – 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’.
Next in the top left corner Configuration scope selector drop-down you should see the default scope, the website scope and the webstore scope.
You’ll want to select the last option in the list (or each leaf if you have more than one store).
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.
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.