I don’t get any errors anymore since I have deleted the authentication… Everything is working just like it should for the customers. Only problem is that it is probably possible for someone to program something to trick my site into thinking they paid (but I can still verify whether they actually paid or not if I log into Google Checkout). Before I removed the authentication I received the following error in the google integration console.
We encountered an error trying to access your server at https://secure.domainname.com/googlecheckout/api/—the error we got is: Sending failed with HTTP response code: 401. Response body was: Failed to Get Basic Authentication Headers
problem was related to the merchant calculations - we were unable to prepare shipping rates for multiple addresses coming to our merchant calculation script. also we were unable to reproduce the problem here because google sends us 1 address each time only independently how many addresses we have in the buyer account and according to yours DB dump you were receiving all addresses in the account at once that was bringing our script to the corner.
fix provided will be additionally tested and included in the next release.
are you using PHP over CGI? it seems that there might be some issues related exactly to this way, but I’ve found no good solutions for it.
also it will be a good idea to contact google support, so they will be able to provide detailed reply about this error and things that are causing it, because I was unable to find anywhere detailed explanation of google checkout errors.
My shipping is set to “Carrier Calculated” but keeps showing all $0 as the cost for shipping. How can I get the Carrier Calculated setting to work correctly?
My shipping is set to “Carrier Calculated” but keeps showing all $0 as the cost for shipping. How can I get the Carrier Calculated setting to work correctly?
Perhaps I can save Serge some time as he has solved this problem for me on the CPM Forum..
1. regarding your int console error, until you have an ssl cert, you need to go into sandbox mode. To do that requires a separate signup with google, which kind of surprised me, but you do it all again at this url
https://sandbox.google.com/checkout/sell/settings?section=Integration
You will get a different key etc, and enter those in magento google api Be sure of course to save your other key and MID for the future.
2. to get rid of 0.00 shipping, replaice this file
/lib/googlecheckout/googlemerchantcalculations.php file with the one attached to this post
If you are having same problems as I, that will do it. Be sure to save original php file just in case. And since I don’t know if you are in the same pickle I was in, I imagine Serge will chime in with more help. But from what you described, it is exactly the same problem.
This file will be part of release 1.1
NOTE REMOVE WORD “NEW” FROM FILE NAME, RENAME YOURE ORIGINAL ...OLD so you have them both.
Update on the google checkout issue. I just tested this using a google sandbox account and the shipping was calculated correctly. However after switching back to my live Google account it still does not work.
Thanks for the response! Sorry I should have posted this, I am already using the new googlemerchantcalculations.php file you posted and I have a SSL cert installed on my server:
it is definitely SSL related issue, so you need a valid SSL cert and right https URL for merchant calculation script.
also check your setup in google account for merchant calculation URL. is it right there? because it seems that google tries to reach you over http instead of https.
@Anna
thanks for your help. I also suggest to get the latest Callback.php script from this thread, because it contains one more important fix for merchant calculations, so if you are planing to use merchant calculations some day just keep in mind.
Serge, thanks, I will replace that file, ‘just in case’, one never knows for sure.
OP (sorry can’t see your name here), no I think that was all I did, but of course I do not have an SSL cert yet, so now I will worry that when I do, the problem will return!
In google checkout under Settings, Integration, API callback URL: i have https://www.rawjuicers.com/googlecheckout/api/. Is this what you mean by “merchant calculation URL? Also you mentioned that I need the “right https URL for merchant calculation script\” is this a configuration that needs to be entered in magento admin somewhere? I have looked everywhere but cant find any place to enter this. Thankyou for your quick response!
merchant calculation URL = API callback URL
right https URL for merchant calculation script = https://www.rawjuicers.com/googlecheckout/api/
it seems that you have configured everything right in the google checkout.
please, in the Magento admin area turn on Google API debug mode, run a few more tests and send me a dump of your googlecheckout_api_debug table.
I also posted this to Googles forum. Here is the response I got from them.
Hi Mike,
Thank you for your email.
I understand that you’re currently encountering an integration error with
Magento and Google Checkout. It appears that this issue is being caused
by the Merchant Calculations URL specified. This URL is actually
specified in the shopping cart post and not in the Merchant Center. It
needs to be specified using https instead of http:
Unfortunately, I’m not extremely familiar with Magento so I can’t provide
step by step instructions on modifying this. I suggest posting a question
in their forums for additional assistance on modifying the XML cart post.
If you have any further questions directly related to Google Checkout,
please feel free to contact us.
Ok i got it working by using a pretty ugly hack. Here is what I did. In app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php line 173 looks like this
It appears this is where the merchant calculations url gets added before being posted to google, but for whatever reason it is not creating the secure version of the url. So I took out “$this->_getCalculationsUrl()” and just hard coded the correct url in. Here is what it looks like.
///////////////////////////////////////// Google Hack to fix shipping
$google_url_hack = ‘https://www.rawjuicers.com/googlecheckout/api/’;
/////////////////////////////////////////
actually to have the https URL sent to google you need to turn on front-end secure URLs: admin->System->Configuration->Web->Secure->Use Secure URLs in Frontend, set it to “Yes”.
however this point is the good one and I will make a proposition to add a new Google API configuration point to switch between http/https callback URLs, so it will go with no relations to Usage of Secure URLs in Frontend.