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]
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hello Serge,

Many thanks for your reply. I will try that and post the results later today as soon as I am back at my computer, as I am away at the moment.

Many thanks for your efforts!
Lisa

PS: You post says “Posted: 11 months ago”? How did you manage that? smile

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

Hello, Lisa

do you still see “Posted: 11 months ago” ?
probably it was anything temporary, I don’t even have an idea what it could be. currently I see “Posted: 1 hour ago” as normal…

Best regards,
Serge

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hi Serge,

I could not find the first two lines in my .htaccess file, but I added the second two ones as you suggested and run a couple of tests again.

I did not see anything new in the GC console, just the same “Your server returned no data in its reply; Checkout requires data of type merchant-calculation-results in reply to merchant-calculation-callback”. Nothing new either in the SQL debug table as far as I can see - I have attached another dump.

Many thanks, Serge!

Best regards,
Lisa

File Attachments
googlecheckout_api_debug.sql  (File Size: 15KB - Downloads: 213)
 
Magento Community Magento Community
Magento Community
Magento Community
 
etho201
Sr. Member
 
Total Posts:  85
Joined:  2008-04-03
Summerville, SC
 
Serge at Varien - 05 June 2008 06:32 AM

Etho, Lisa

UK could be a factor!

as far as I can see in the google doc:

http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Carrier_Calculated_Shipping.html

in the overview they have a note:

Note: This feature is only supported for shipments sent to and from U.S. postal addresses. In addition, any costs associated with carrier-calculated shipping methods must be specified in U.S. dollars (USD).

so I think it might be a problem that you are not sending from and to U.S. postal addresses.
please, double check it with google.

Best regards,
Serge

Hi Serge,

I’m in the US and all the addresses I have been testing have been US only. I finally got Carrier Calculated Shipping to work after I deleted the code in Magento that checked for any type of authentication. Hopefully this will just be a temporary fix but I have tried everything I could think of to get the authentication working.

Thanks,

Erik

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

I am having problems with google checkout also. Shipping is showing 0.0 when using “Carrier Calculated”. The error i am getting in the google intigration consol is:

“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.”

Not sure why it is trying to use a unsceure url. The url i put as my call back url is:

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

Any ideas on this?

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

Hello guys,

Lisa, I will prepare some changes to the code to debug the problem.

etho201, what error exactly do you get in the google checkout integration console?

mikefifield, I am unsure what kind of problem you have, so I suggest first of all to check if you have a valid SSL certificate and as an alternative test open a google checkout sandbox account and try to use merchant calculation callback URL over http with it.

Best regards,
Serge

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hi Serge,

Many thanks for that, do let me know when that’s ready and I will test it immediately.

I much appreciate your help!

Best regards,
Lisa

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

ok, Lisa, so let’s do the following:

make backup copy of /app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php and replace it with the file attached.

than go to the admin->System->Configuration->ADVANCED->Developer->Log Settings, and enable it.

run a few tests and send me last messages in the google integration console and all files in your /var/log folder (you can compress them wink).

Best regards,
Serge

File Attachments
Callback.php  (File Size: 21KB - Downloads: 260)
 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hello Serge,

Done as instructed. Here are the results:

GC integration console:

“Error parsing XML; message from parser is: Content is not allowed in prolog”

1235678—_responseMerchantCalculationCallback—90b


<merchant-calculation-callback xmlns="http://checkout.google.com/schema/2" serial-number="0a0e091a-719b-4702-ab18-db2c4b676598">
<shopping-cart>
<items>
<item>
<item-weight value="10.0" unit="LB" />
<tax-table-selector>2</tax-table-selector>
<item-name>Test</item-name>
<item-description></item-description>
<quantity>3</quantity>
<unit-price currency="GBP">10.0</unit-price>
<merchant-item-id>test</merchant-item-id>
<merchant-private-item-data>


<quote-item-id>47</quote-item-id>


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


<quote-id>41</quote-id>


</merchant-private-data>
</shopping-cart>
<buyer-id>949842525499086</buyer-id>
<calculate>
<addresses>
<anonymous-address id="261286200525582">
<country-code>GB</country-code>
<postal-code>SE8 4DS</postal-code>
<city>London</city>
<region>LONDON</region>
</anonymous-address>
<anonymous-address id="502926368539481">
<country-code>GB</country-code>
<postal-code>SE8 5DD</postal-code>
<city>London</city>
<region>LONDON</region>
</anonymous-address>
</addresses>
<shipping>
<method name="Royal Mail - Shipping” />
</shipping>
<tax>true</tax>
<merchant-code-strings />
</calculate>
<buyer-language>en_US</buyer-language>
</merchant-calculation-callback>


Attached are my log files from /var/log - although I thought that after having enabled the log settings in admin, there would be two new files there - system.log and exception.log - but they’re not there. The var/log is chmod-ed to 777.

Thank you Serge!
Lisa

File Attachments
log.zip  (File Size: 6KB - Downloads: 114)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Serge at Varien
Magento Team
 
Avatar
Total Posts:  73
Joined:  2008-01-18
 

Lisa, please try updated /app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php attached to the current post.
let me know your results (attach integration console messages and also /var/log files).

Thank you!
Serge

File Attachments
Callback.php  (File Size: 22KB - Downloads: 163)
 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hello Serge,

Here are the latest results, attached.

It seems that at least GC is now receiving some, but incomplete data from Magento. Please see attached. All logs zipped into one.

Thanks Serge!

Best regards,
Lisa

File Attachments
log.zip  (File Size: 7KB - Downloads: 137)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Serge at Varien
Magento Team
 
Avatar
Total Posts:  73
Joined:  2008-01-18
 

Lisa, new /lib/googlecheckout/googlemerchantcalculations.php attached. btw, it was a fix AnnaM were sharing with you as I know, so probably you should have updated script already, but it seems that you haven’t.

please try it once more and give us your feedback.

Best regards,
Serge

File Attachments
googlemerchantcalculations.php  (File Size: 5KB - Downloads: 332)
 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hi Serge,

Not a problem - I did try the file Anna gave me, but as it made no difference at the time, I went back to the old one. I have now updated it with the one you attached in your post and tested again.

Now GC says:

“Merchant Calculations: We were looking for data in your merchant-calculation-results, but were not able to find it: shipping-name”

XML We Received: <?xml version="1.0" encoding="utf-8"?>
<merchant-calculation-results xmlns="http://checkout.google.com/schema/2">
<results>
<result shipping-name="Royal Mail - Shipping” address-id="261286200525582">
<shipping-rate currency="GBP">4</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
<result address-id="261286200525582">
<total-tax currency="GBP">0</total-tax>
</result>
<result shipping-name="Royal Mail - Shipping” address-id="502926368539481">
<shipping-rate currency="GBP">4</shipping-rate>
<shippable>true</shippable>
<total-tax currency="GBP">0</total-tax>
</result>
<result address-id="502926368539481">
<total-tax currency="GBP">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="bc67ad92-73d5-4c35-a3b9-7f380b3a5b1d">
<shopping-cart>
<items>
<item>
<item-weight value="10.0" unit="LB" />
<tax-table-selector>2</tax-table-selector>
<item-name>Test</item-name>
<item-description></item-description>
<quantity>4</quantity>
<unit-price currency="GBP">10.0</unit-price>
<merchant-item-id>test</merchant-item-id>
<merchant-private-item-data>


<quote-item-id>48</quote-item-id>


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


<quote-id>42</quote-id>


</merchant-private-data>
</shopping-cart>
<buyer-id>949842525499086</buyer-id>
<calculate>
<addresses>
<anonymous-address id="261286200525582">
<country-code>GB</country-code>
<postal-code>SE8 4DS</postal-code>
<city>London</city>
<region>LONDON</region>
</anonymous-address>
<anonymous-address id="502926368539481">
<country-code>GB</country-code>
<postal-code>SE8 5DD</postal-code>
<city>London</city>
<region>LONDON</region>
</anonymous-address>
</addresses>
<shipping>
<method name="Royal Mail - Shipping” />
</shipping>
<tax>true</tax>
<merchant-code-strings />
</calculate>
<buyer-language>en_US</buyer-language>
</merchant-calculation-callback>

--------------------------------------------------------------------------------

Best regards,
Lisa

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

Hello Lisa

well, it is going really better.

problem is that we cannot reproduce your conditions and requests from google are a bit different, so we are blind when trying to fix it.
please take attached Callback.php (googlemerchantcalculations.php you should left like you have got from me).

Best regards,
Serge

File Attachments
Callback.php  (File Size: 22KB - Downloads: 328)
 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Serge,

I am about to fall off my chair!

THIS SEEMS TO BE WORKING!

The postage is calculated properly. There are no errors in the integration console! YAY!

I will do more thorough checks during the next couple of days, and will confirm after that, but from what I can see, this works fine (apart from that is says TAX instead of VAT, but that is not an issue whatsoever).

Could you share with us what the problem was?

Many, many, many, many thanks for your help - you have no idea how much it means!

Lisa
smilesmilesmile

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