2
votes

I have a site running in Hostgator shared-hosting account with Google Checkout (GC) working since v1.2 - when the site first gone live, the GC works out-of-the-box.

Recently I moved the site to a VPS server and GC stopped working with this error: Google Checkout: Invalid response from Google Checkout server

I thought it couldn’t be an issue with Magento’s Google Checkout integration but the new VPS server or maybe SSL cert that require further testing, so I moved the site back to the shared server (the GC starts working again!), and then setup a test site with a valid SSL cert, a working GC account.

3 weeks had passed still GC wouldn’t work in the VPS server; I have tried/searched/tested all possibilities along with the help from Hostgator’s support, and we have exhausted all options to a point that we believe it has nothing to do with SSL cert setup nor the server configuration.

From the above error and the log from "var/log/payment_googlecheckout" I reckon it couldn’t redirect to checkout.google.com/schema/2

<order-processing-support>
<request-initial-auth-details>true</request-initial-auth-details>
</order-processing-support>
</checkout-shopping-cart>
[dir] => out

It seems a number of people had experienced the same error before but no one seems to be able to find the cause, and I am starting to think it’s a bug lies on Magento’s Google Checkout module.

If you had this issue before and had it solved, please share. Thanks!

1
What version of Magento is the site running now?benmarks
This problem must not really be unsolvable if you're posting a question here... ;)kitti
It's running on v1.6.2. There had never had issue with every version update.user1258365

1 Answers

1
votes

This person seems to have had a similar problem and it was due to an issue with their cURL installation. Have you compared versions from your shared hosting with your VPS? I'd compare: PHP versions, PHP extension versions, php.ini settings, and versions of cURL itself.

If none of that bring about any results, open up app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php and modify the _call() method like this:

// app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php

public function _call($xml)
{
    // ... snip ...
    $result = @simplexml_load_string($response);
    if (!$result) {
        // Add this...
        Mage::log(var_export($response, true), null, 'google_checkout_debug.log', true);
        // ... end
        $result = simplexml_load_string('<error><error-message>Invalid response from Google Checkout server</error-message></error>');
    }

With this, you will have the exact response from Google logged to var/log/google_checkout_debug.log. Use this to debug what might be going wrong (perhaps there is another error message embedded in the response).

Just remember to remove the code when you're done!