Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Google Checkout - Carrier Calculated shipping problem [semi-solved]
 
etho201
Sr. Member
 
Total Posts:  85
Joined:  2008-04-03
Summerville, SC
 
Serge at Varien - 10 June 2008 06:59 AM

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

Yes, I do have PHP over CGI. I have seen a fix for this at http://prashcom.blogspot.com/2007/09/google-checkout-failed-to-get-basic.html but I was not able to get it to work. I have posted on the google boards with questions but I have never actually tried contacting support personally.

Quote from the link above:

When a using HTTP basic PHP will automatically populate $_SERVER[’PHP_AUTH_USER’] and $_SERVER[’PHP_AUTH_PW’] variables with the username and password that were provided. IF and ONLY IF PHP is being run as a server module (like mod_php). If you are running PHP as a CGI then those two variables won’t get created at all, ever, even when using HTTP basic authentication. And since you can’t do anything in WordPress via AtomPub without authenticating you are dead in the water. Well, not exactly.
However, there is a workaround available which can make HTTP Auth for PHP working even when in CGI mode…

Then he goes on to show how to fix the situation but I wasn’t able to translate that into a fix for Magento.

Thanks for your reply,

Erik

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

@Serge

URLs: admin->System->Configuration->Web->Secure->Use Secure URLs in Frontend, set it to “Yes”.

I have had this set to “Yes” all along but it was still sending the unsecure url to google.

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

@Erik

I’ll check solution they posted, maybe we will be able to adapt it for Magento.

@Mike

and do you have https base_url there?

Best regards,
Serge

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

@Erik

please, look for the next line in your .htaccess:

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

probably you are using older version of .htaccess and just don’t have it.
please, try to add it and re-test. keep us informed on results smile thanks!

Best regards,
Serge

P.S. you need to have mod_rewrite installed on the server! you should have the one if you are able to use front-end URLs without /index.php/ inside.

 
Magento Community Magento Community
Magento Community
Magento Community
 
etho201
Sr. Member
 
Total Posts:  85
Joined:  2008-04-03
Summerville, SC
 

Serge,

I checked my .htaccess file and I already have that line in there:

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
############################################

Yes, as far as I know I do have mod_rewrite as I do not need /index.php in my urls.

I have tried adding lines like:

############################################
## HTTP Basic Authentication for Google Checkout
##
##    AuthUserFile ../.htpasswds/public_html/passwords
##    AuthName "Google Checkout"
##    AuthType Basic
##    Require user 469326734638364
(uncommented of course, but have had no success) I haven’t seen any other magento users mention doing anything like that so I doubt that would be the problem.

Thank you for your quick reply,

Erik

 
Magento Community Magento Community
Magento Community
Magento Community
 
etho201
Sr. Member
 
Total Posts:  85
Joined:  2008-04-03
Summerville, SC
 

Serge,

I have also seen a useful site that has some tools for Google Checkout, one of them being an .htaccess generator described as: .htaccess .htpasswd pair for Google Checkout Basic authentication on CGI php installations - Link to site: http://demo.globant.com/~brovagnati/tools/htaccess.php

It looks promising and I tried using that but I had trouble implementing that into my installation. Due mostly because of a lack of understanding of htaccess and basic authentication.

Thanks,

Erik

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

@Serge

Yep I had the https url and in the correct field and URLs: admin->System->Configuration->Web->Secure->Use Secure URLs in Frontend, set it to “Yes”.  It still posts the http version of the url.

Thanks.

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

@etho201, Mike

thank you guys, we keep checking it on our end.
please, inform us if any news regarding your problems will be found.

Thanks,
Serge

 
Magento Community Magento Community
Magento Community
Magento Community
 
l0st
Member
 
Total Posts:  55
Joined:  2008-04-06
 

I’m actually having the same exact problem!

https://sdfta.com/index.php/googlecheckout/api.index.php

That is where my api is but I got a lot of errors. please check this thread!
http://www.magentocommerce.com/boards/viewthread/10651/

 
Magento Community Magento Community
Magento Community
Magento Community
 
RPGShop
Sr. Member
 
Total Posts:  143
Joined:  2008-06-16
 

I’ve done most of the above changes to php code and I have an SSL cert and I just can’t seem to get the actual shipping call to work. I’ve even done the mode to change the url manually in Callback.php but I doubt that was my issue.

Here is what is is my debug table…

I’m at a loss… Thoughts?

James

<?xml version="1.0" encoding="UTF-8"?>

<checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">
<
shopping-cart>
<
items>
<
item>
<
merchant-item-id><![CDATA[KOP 05717]]></merchant-item-id>
<
item-name><![CDATA[16mm d6 Dragon Dice]]></item-name>
<
item-description><![CDATA[]]></item-description>
<
unit-price currency="USD">0.5500</unit-price>
<
quantity>1</quantity>
<
item-weight unit="LB" value="0.2500" />
<
tax-table-selector>2</tax-table-selector>

<
merchant-private-item-data>
<
quote-item-id>33</quote-item-id>
</
merchant-private-item-data>
</
item>
</
items>
<
merchant-private-data>
<
quote-id><![CDATA[39]]></quote-id>
</
merchant-private-data>

</
shopping-cart>
<
checkout-flow-support>
<
merchant-checkout-flow-support>
<
edit-cart-url><![CDATA[https://secure.rpgshop.com/googlecheckout/redirect/cart/]]></edit-cart-url>
<continue-shopping-url><![CDATA[https://secure.rpgshop.com/googlecheckout/redirect/continue/]]></continue-shopping-url>
<request-buyer-phone-number>false</request-buyer-phone-number>
<
merchant-calculations>
<
merchant-calculations-url><![CDATA[http://secure.rpgshop.com/googlecheckout/api/]]></merchant-calculations-url>
</merchant-calculations>
<
shipping-methods>
<
carrier-calculated-shipping>
<
shipping-packages>
<
shipping-package>
<
ship-from id="Origin">
<
city>Greenfield</city>
<
region>64</region>
<
postal-code>53228</postal-code>
<
country-code>US</country-code>
</
ship-from>
<
width unit="IN" value="9"/>
<
height unit="IN" value="4"/>
<
length unit="IN" value="13"/>
<
delivery-address-category>RESIDENTIAL</delivery-address-category>
</
shipping-package>
</
shipping-packages>
<
carrier-calculated-shipping-options> <carrier-calculated-shipping-option>
<
shipping-company>USPS</shipping-company>
<
shipping-type>Priority Mail</shipping-type>
<
price currency="USD">8.9</price>
</
carrier-calculated-shipping-option> </carrier-calculated-shipping-options>
</
carrier-calculated-shipping>



</
shipping-methods>
<
tax-tables merchant-calculated="true">
<default-
tax-table>
<
tax-rules>
<default-
tax-rule>
<
tax-area>
<
world-area/>
</
tax-area>
<
rate>0</rate>
<
shipping-taxed>false</shipping-taxed>
</default-
tax-rule>
</
tax-rules>
</default-
tax-table>
<
alternate-tax-tables>
<
alternate-tax-table name="none" standalone="false">
<
alternate-tax-rules>
<
alternate-tax-rule>
<
tax-area>
<
world-area/>
</
tax-area>
<
rate>0</rate>
</
alternate-tax-rule>
</
alternate-tax-rules>
</
alternate-tax-table>
<
alternate-tax-table name="2" standalone="false">
<
alternate-tax-rules>
<
alternate-tax-rule>
<
tax-area>
<
us-state-area>
<
state>NY</state>
</
us-state-area>
</
tax-area>
<
rate>0.055000</rate>
</
alternate-tax-rule>
<
alternate-tax-rule>
<
tax-area>
<
us-state-area>
<
state>CA</state>
</
us-state-area>
</
tax-area>
<
rate>0.055000</rate>
</
alternate-tax-rule>
</
alternate-tax-rules>
</
alternate-tax-table>
</
alternate-tax-tables>
</
tax-tables>


<
platform-id>473325629220583</platform-id>
<
analytics-data><![CDATA[X191YWNjdD1VQS0zNDI5OTI4LTI7X191c2Vydj0xO19fdXd2PTQuMjtfX3Vmc2M9MTtfX3V0aXRsZT0xO19fdWZsYXNoPTE7X191bWN2YWw9X191dG1hJTNEMzY3MDMwNzUuNjYyOTE2MTMwLjEyMDA2MTMzODguMTIxNDA2OTIzNi4xMjE0MDczNzMzLjYzJTNCX191dG1iJTNEMzE4NzkxMDAuNTkuMTAuMTIxNDA5MzQzNyUzQl9fdXRtYyUzRDM2NzAzMDc1JTNCX191dG16JTNEMzY3MDMwNzUuMTIxMzMzOTM5My4yOS4zLnV0bWNjbiUzRCUyOHJlZmVycmFsJTI5JTdDdXRtY3NyJTNEcnBnc2hlZXRzLmNvbSU3Q3V0bWNjdCUzRC8lN0N1dG1jbWQlM0RyZWZlcnJhbCUzQl9fdXRtdiUzRCUzQl9fdXRteCUzRCUzQl9fdXRteHglM0QlM0I7]]></analytics-data>
</
merchant-checkout-flow-support>
</
checkout-flow-support>
<
order-processing-support>
<
request-initial-auth-details>true</request-initial-auth-details>
</
order-processing-support>
</
checkout-shopping-cart>
 
Magento Community Magento Community
Magento Community
Magento Community
 
proteinshake
Member
 
Total Posts:  42
Joined:  2008-05-12
 

For Google Checkout I am using Merchant Calculated shipping since I want to use table rates. However, when checking out in sandbox mode It doesn’t use my table rates from the csv file, but the default price instead.

I have read through this thread and tried everything using all of the updated files and I still have the problem.  Any help is greatly appreciated. Thanks

Here is the Error I am getting from the Integration Console:

Error: Merchant Calculations: We were looking for data in your merchant-calculation-results, but were not able to find it: result: address-id:544533127820275shipping-name: UPS Standard - 3-5 Business Days.

XML We Received:

<?xml version="1.0" encoding="utf-8"?>
<merchant-calculation-results xmlns="http://checkout.google.com/schema/2">
<results>
<result shipping-name="USPS Priority - 2-3 Business Days” address-id="544533127820275">
<shipping-rate currency="USD">4.9</shipping-rate>
<shippable>true</shippable>
<total-tax currency="USD">0</total-tax>
</result>
<result shipping-name="UPS 3 Day Select - 3 Business Days” address-id="544533127820275">
<shipping-rate currency="USD">8.95</shipping-rate>
<shippable>true</shippable>
<total-tax currency="USD">0</total-tax>
</result>
<result shipping-name="UPS 2nd Day Air - 2 Business Days” address-id="544533127820275">
<shipping-rate currency="USD">12.6</shipping-rate>
<shippable>true</shippable>
<total-tax currency="USD">0</total-tax>
</result>
<result shipping-name="UPS Next Day Air - 1 Business Day” address-id="544533127820275">
<shipping-rate currency="USD">32.65</shipping-rate>
<shippable>true</shippable>
<total-tax currency="USD">0</total-tax>
</result>
</results>
</merchant-calculation-results>

XML We Sent:

<?xml version="1.0" encoding="UTF-8"?>
<merchant-calculation-callback xmlns="http://checkout.google.com/schema/2" serial-number="74210168-a1f3-4ed9-a660-588c196f4f08">
<shopping-cart>
<items>
<item>
<item-weight value="0.788" unit="LB" />
<tax-table-selector>2</tax-table-selector>
<item-name>USB 2.0 Sharing Switch 2 to 1 </item-name>
<item-description></item-description>
<quantity>1</quantity>
<unit-price currency="USD">16.99</unit-price>
<merchant-item-id>usb_2_to_1_switch</merchant-item-id>
<merchant-private-item-data>


<quote-item-id>66</quote-item-id>


</merchant-private-item-data>
</item>
</items>
<merchant-private-data>


<quote-id>1207</quote-id>


</merchant-private-data>
</shopping-cart>
<buyer-id>156423594886432</buyer-id>
<calculate>
<addresses>
<anonymous-address id="544533127820275">
<country-code>US</country-code>
<postal-code>33559</postal-code>
<city>lutz</city>
<region>FL</region>
</anonymous-address>
</addresses>
<shipping>
<method name="USPS Priority - 2-3 Business Days” />
<method name="UPS Standard - 3-5 Business Days” />
<method name="UPS 3 Day Select - 3 Business Days” />
<method name="UPS 2nd Day Air - 2 Business Days” />
<method name="UPS Next Day Air - 1 Business Day” />
</shipping>
<tax>true</tax>
<merchant-code-strings />
</calculate>
<buyer-language>en_US</buyer-language>
</merchant-calculation-callback>

 
Magento Community Magento Community
Magento Community
Magento Community
 
proteinshake
Member
 
Total Posts:  42
Joined:  2008-05-12
 

Well, I fixed my problem. It was related to the tablerate.csv files. One of them was formatted incorrectly and it was causing all of the shipping prices to go to the default prices in google checkout.

 
Magento Community Magento Community
Magento Community
Magento Community
 
RPGShop
Sr. Member
 
Total Posts:  143
Joined:  2008-06-16
 

THough I could never get sandbox mode to work for me, the live mode does work except the shipping… Your reformated file sounds like something to try. Can you please post it?

James

 
Magento Community Magento Community
Magento Community
Magento Community
 
proteinshake
Member
 
Total Posts:  42
Joined:  2008-05-12
 

It won’t let me attach a file for some reason but I here’s how I have my csv’s:

Country Region/State Zip/Postal Code Weight (and above) Shipping Price
USA * * 2 7.82
USA * * 3 8.26
USA * * 4 8.54

I ran into another problem though. When I submit an order, it doesn’t send any information back to my website. I had it working on my first try then I left it thinking everything was ok. I can’t remember changing much since then, but now new orders aren’t showing on dashboard when I test order. There are no errors showing in the integration console either…

I am using the same API callback URL which was http://www.mysite.com/googlecheckout/api/

Any suggestions? Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 
proteinshake - 22 June 2008 10:59 PM

I ran into another problem though. When I submit an order, it doesn’t send any information back to my website. I had it working on my first try then I left it thinking everything was ok. I can’t remember changing much since then, but now new orders aren’t showing on dashboard when I test order. There are no errors showing in the integration console either…

I am using the same API callback URL which was http://www.mysite.com/googlecheckout/api/
Any suggestions? Thanks

AFAIK, for that you need SSL on your domain and you also need to enter https:://… as your callback URL.

Good luck!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top