If you are struggeling to integrate the google checkout with Magento and facing the following error in google checkout console
We encountered an error trying to access your server at https://yourdomain.com/googlecheckout/api -- the error we got is Send failed with code: 401. Response body was: Failed to Get Basic Authentication Headers
We assume that SSL has been installed correctly and you have also verified the settings on both ends, that is Magento and Google Checkout. There is hack to fix this. You have to open following file:
/public_html/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php
$status = $this->getGResponse()->HttpAuthentication();
if (!$status || empty($data[$root])) {
exit;
}
It does pose a slight security risk because it removes the HTTP basic authentication. So, if someone were to figure out you removed basic authentication then they could find a way to trick it and make your Magento store think that they paid when they really did not. As long as you confirm that you received the payment by logging into google checkout and looking at the orders/payouts tab you won’t have any problems. If your site is rather busy, and you process lots of sales everyday, this could become tedious. It might also be wise to make sure they payed the correct amount in Google Checkout. I believe that it is very unlikely that this will ever happen though.
Source : http://www.magentocommerce.com/boards/viewthread/5960/P90/#t51965
1 Comment
I started to get this error as well, and realized on a recent backup the htaccess file had changed.
The following was #’d out
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Once I removed the leading # all started working again, hope it will wok for others.
Thanks for the great articles, come in very handy