Troubleshooting

Debugging via Magento


  1. Switch on Debug within the Google API->Google Checkout settings in admin.
  2. Run a test on frontend where you enter Google Checkout
  3. Within phpMyAdmin look at the table “googlecheckout_api_debug”. You should see both a request body and a response body

The request body should look something like below:

<?xml version="1.0" encoding="UTF-8"?>
<merchant-calculation-callback xmlns="http://checkout.google.com/schema/2" serial-number="5747477-
35235-23525-2352">
<shopping-cart>
<merchant-private-data>
<quote-id><![CDATA[4]]></quote-id>
</merchant-private-data>
<items>
<item>
<item-weight value="1.0" unit="LB" />
<tax-table-selector>none</tax-table-selector>
<item-name>test</item-name>
<item-description></item-description>
<quantity>1</quantity>
<unit-price currency="GBP">1.0</unit-price>
<merchant-item-id>test</merchant-item-id>
<merchant-private-item-data>
<quote-item-id>4</quote-item-id>
</merchant-private-item-data>
</item>
</items>
</shopping-cart>
<buyer-id>227105150286196</buyer-id>
<calculate>
<addresses>
<anonymous-address id="325421987741160">
<country-code>GB</country-code>
<postal-code>test</postal-code>
<city>test</city>
<region>ESSEX</region>
</anonymous-address>
</addresses>
<shipping>
<method name="Select Shipping Method - Worldwide" />
<method name="Select Shipping Method - Ground" />
<method name="Select Shipping Method - Next Day" />
</shipping>
<tax>true</tax>
<merchant-code-strings />
</calculate>
<buyer-language>en_US</buyer-language>
</merchant-calculation-callback>


The response body should look something like below:


<?xml version="1.0" encoding="utf-8"?>
<merchant-calculation-results xmlns="http://checkout.google.com/schema/2">
<results>
<result shipping-name="Select Shipping Method - Worldwide" address-id="325421987741160">
<shipping-rate currency="GBP">50</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
<result shipping-name="Select Shipping Method - Ground" address-id="325421987741160">
<shipping-rate currency="GBP">0</shipping-rate>
<shippable>false</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
<result shipping-name="Select Shipping Method - Next Day" address-id="325421987741160">
<shipping-rate currency="GBP">0</shipping-rate>
<shippable>false</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
</results>
</merchant-calculation-results>


If you are not getting back shipping rates then check that in Magento frontend you do get back rates for the shipping address you have defined in Google Checkout. This is most commonly indicated by shippable being set to false in all rates in the response body.
If you are not seeing a response body the problem is likely to be because you haven't got Magento setup correctly, e.g. Secure Callback not switched on, SSL cert not in place.

Every time you upload a CSV file I would advise you re-select the merchant shipping methods – otherwise you may see unexpected results. Strictly this is not necessary, but with this I would advise to be on safe side.


Debugging via Google Checkout




In Google Checkout itself there is an integration console. This will give details of failed callbacks to Magento, and the reasons around it. The information is not great, but should provide a pointer.


Checking Callback URL


Ensure that the callback URL works. This is not really recommended unless you know what you are doing. WGET is available from the internet – do a Google search.

From a command line do the following:

wget –-post-data=foo <store_url>/googlecheckout/api/

You should see either a 200 OK or a 302 Found. If you see a 404 Not Found then you may have an issue with your callback.




Free Shipping Rates Not Being Passed To Google Checkout


There is a problem with Google Checkout where free shipping rates from Productmatrix/Premium Matrixrate are not passed to Google Checkout.


The solution was to change the shipping price in PHPMyAdmin from 0.0000 to 0.0001. In the MerchantProductCalculations call this then gets rounded down to £0.00, but is still passed as a valid shipping rate to Google. If you simply have a price of 0.0000, the shipping method is passed as shippable=false to Google checkout, which was causing the problem.