Call-back icon  Sales: Call 877.832.5289 (N America)|310.295.4144 (International)

Magento

eCommerce Software for Online Growth

Magento Forum

   
Google Checkout - Carrier Calculated shipping problem [semi-solved]
 
etho201
Sr. Member
 
Total Posts:  85
Joined:  2008-04-03
Summerville, SC
 

Serge,

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

Thanks for your help!

Erik

 Signature 

http://www.omnivariety.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Serge at Varien
Magento Team
 
Avatar
Total Posts:  73
Joined:  2008-01-18
 

Lisa,

please keep us informed how it goes for you…

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.

Best regards,
Serge

 
Magento Community Magento Community
Magento Community
Magento Community
 
Serge at Varien
Magento Team
 
Avatar
Total Posts:  73
Joined:  2008-01-18
 

Hello Erik!

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.

Best regards,
Serge

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikefifield
Member
 
Avatar
Total Posts:  34
Joined:  2008-05-24
 

@ Serge

I keep getting the following error in my google integration consol:

“URL you are using for merchant calculations is not valid or is not https http://www.rawjuicers.com/googlecheckout/api/—the error we got is: An HTTPS URL is required”

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?

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  312
Joined:  2008-01-29
San Francisco
 
mikefifield - 10 June 2008 10:06 AM

@ Serge

I keep getting the following error in my google integration consol:

“URL you are using for merchant calculations is not valid or is not https http://www.rawjuicers.com/googlecheckout/api/—the error we got is: An HTTPS URL is required”

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.

Hope that does it for you.

File Attachments
googlemerchantcalculationsNEW.php  (File Size: 5KB - Downloads: 36)
 Signature 

Anna
Live Long and Prosper

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikefifield
Member
 
Avatar
Total Posts:  34
Joined:  2008-05-24
 

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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikefifield
Member
 
Avatar
Total Posts:  34
Joined:  2008-05-24
 

@AnnaM,

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:

https://www.rawjuicers.com/

But still getting the errors in the consol and shipping is still $0.0.

Again thanks for the post, any other ideas? Did you change anything else that may have help correct this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Serge at Varien
Magento Team
 
Avatar
Total Posts:  73
Joined:  2008-01-18
 

@Mike

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.

Best regards,
Serge

 
Magento Community Magento Community
Magento Community
Magento Community
 
AnnaM
Guru
 
Avatar
Total Posts:  312
Joined:  2008-01-29
San Francisco
 

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!  cheese

 Signature 

Anna
Live Long and Prosper

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikefifield
Member
 
Avatar
Total Posts:  34
Joined:  2008-05-24
 

@ Serge

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!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Serge at Varien
Magento Team
 
Avatar
Total Posts:  73
Joined:  2008-01-18
 

@Mike

merchant calculation URL = API callback URL
right https URL for merchant calculation script = https://www.rawjuicers.com/googlecheckout/api/ smile
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.

Best regards,
Serge

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikefifield
Member
 
Avatar
Total Posts:  34
Joined:  2008-05-24
 

Here is the debug output.

File Attachments
googlecheckout_api_debug.sql  (File Size: 19KB - Downloads: 5)
 
Magento Community Magento Community
Magento Community
Magento Community
 
mikefifield
Member
 
Avatar
Total Posts:  34
Joined:  2008-05-24
 

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:

https://www.rawjuicers.com/googlecheckout/api/

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.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikefifield
Member
 
Avatar
Total Posts:  34
Joined:  2008-05-24
 

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

<merchant-calculations-url><![CDATA[{$this->_getCalculationsUrl()}]]></merchant-calculations-url>

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/’;
/////////////////////////////////////////

$xml = <<<EOT
<merchant-calculations>
<merchant-calculations-url><![CDATA[$google_url_hack]]></merchant-calculations-url>
</merchant-calculations>
EOT;
return $xml;
}

I know it’s not pretty but for now it works. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Serge at Varien
Magento Team
 
Avatar
Total Posts:  73
Joined:  2008-01-18
 

Hello Mike,

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.

Best regards,
Serge

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
53232 users|917 users currently online|107294 forum posts