Now, I have disabled the basic authentication by forcing the HTTPAuthentication() to return true without any validation. This seems to have fixed the problem. I dont get the
HTTP response code: 401. Response body was: Failed to Get Basic Authentication Headers
error anymore. I am not sure of the security implication of this. Would this mean anyone can send any XML data to the callback function, and potentially cause any harm? I will look to see how I could make Apache pass the HTTP information to the PHP and fix this loop hole.
Anyways, now I am have another simpler problem. I get the following parse error:
Error parsing XML; message from parser is: The value following "version" in the XML declaration must be a quoted string.
Warnings:
XML we received:
<?xml version=1.0 encoding=utf-8 ?>
<merchant-calculation-results xmlns="http://checkout.google.com/schema/2">
<results>
<result shipping-name="Weight Based Shipping - Zone (1-2)" address-id=113815907023469>
<shipping-rate currency=USD>6.99</shipping-rate>
<shippable>true</shippable>
</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="00da4d8e-ebe8-4f3c-84f4-ed0cb70e6630">
<shopping-cart>
<merchant-private-data>
- - - - - - - - - - - - - - -
I quickly tried to look in the gcheckout.php to see how the XML string is generated so I could add the quotes but I could find it. I tried searching for this error but no opencart users seem to have got this error ( why me! ). If you could point me to where I should add these quotes I might be good to go. Again, thanks for all your help.
Look at
system/google/library/xml-processing/gc_xmlbuilder.php
at line 35 which should be
Code: Select all
$this->xml = '<?xml version="1.0" encoding="utf-8"?>'."\n";
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Is that a possibility at all the way the callback is written? Is there a way I can see what the callback is sending to google? Is there a variable in which the complete XML string is stored before returning it to google? If so which one? May be I could put some code to check the variable right before it is returned to google and make the necessary correction.
Code: Select all
function ProcessMerchantCalculations($merchant_calc) {
$this->SendOKStatus();
$result = $merchant_calc->GetXML();
ob_start();
var_dump( $result );
error_log( ob_get_contents(),3,DIR_LOGS."error.txt" );
ob_end_clean();
echo $result;
}
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
http://forums.devx.com/showthread.php?t=157549
I will try and explain what I mean by random. I add the product on my website and hit google checkout and suddenly I see the correct shipping price ( $6.99 and NOT $0.00 ). Then I wanted to test if it updates and restricts based on selected region. so, I use different addresses that I have saved on my google checkout buyer account. I change from RI to a CA address and I see the yellow no shipping available message. Good. Now, I change it to my MA address and the shipping changes to the zone and the shipping is $0.00. Now, I change it back to RI. The shipping is $6.99. Now, I change it back to MA and surprisingly the shipping is $6.99.
I change it back to CA. - no shipping
Change it to MA - $6.99
change it to CT - $0.00
change it to CA - no shipping
change it to CT - $0.00 ...
At this point I just give up. I found that there is a backup shipping cost that can be used in case there is errors which is passed with the "GoogleMerchantCalculatedShipping()" function. So, I simply changed this function on line 173 in the gcheckout.php to :
Code: Select all
$shipping = new GoogleMerchantCalculatedShipping( $names[$code], 6.99 );
JNeuhoff - Thank you so much for all your time. I greatly appreciate it.
What's in your system/logs/error.txt ?
Does it show the generated XML response correctly, e.g. with correct quotes for the version attribute?
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
string(369) "<?xml version="1.0" encoding="utf-8"?>
<merchant-calculation-results xmlns="http://checkout.google.com/schema/2">
<results>
<result shipping-name="Weight Based Shipping - Zone (1-2)" address-id="113815907023469">
<shipping-rate currency="USD">6.99</shipping-rate>
<shippable>true</shippable>
</result>
</results>
</merchant-calculation-results>
"
Can you look up the corresponding log entries in yourNow, I change it back to RI. The shipping is $6.99. Now, I change it back to MA and surprisingly the shipping is $6.99.
system/logs/googlemessage.log and system/logs/googleerror.log ?
You problem appears to be a session or browser caching issue.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Attachments
Google Message Log
Google Error Log
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I did see in the module description that you mentioned all order processing is done in google checkout. But I noticed this post http://forum.opencart.com/viewtopic.php?t=20919 where Kathlk said "Now I can see my cart get empty when returning from the Google cart. Also I have seen new order created in open cart." So, I wasn't sure if that feature was really not there or if it was an artifact of all the errors I had been seeing. Although, it would nice to have the orders created in opencart so I can manage them all at one place for future accounting and all. I did notice that you have some code for "adding ordered digital items to the database". I could probably use this and code up something that will create orders in the database for all orders but I will save it for another day.
Once again thanks for all your help.
the same problem with GC not getting the shipping right.
I had my shop in maintenance mode and it wasn't working but when
I took it out of maintenance mode it did work correctly and had the correct shipping cost.
Just thought I'd let you all know just in case that had something to do with it.
Gerrit

The all new home for 24/7 TopDeals Furniture is here.
Traditional, Rustic and Stylish oak and pine, bedroom and living room furniture.
I am using 1.5.1.3 I can't get google checkout to calculate shipping, this is the url call back
http://www.toysandbaby.com/index.php?ro ... t/callback
I also tried using https and that didn't work, I also tried having google calculate the shipping from my google merchant acct shipping settings & that didn't work, I have looked at other solutions in this forum & nothing worked, so please any help would be appreciated !!
I am using hostgator as the host with dedicated ssl
The only thing it does calculate the tax.
What else can be the problem ?
Thanks in advance
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
I just checked the error log & I am not a programmer but I have a load of these error message so far today:
2012-04-25 16:35:41 - PHP Notice: Undefined index: route in /home/y7hkr3t7/public_html/catalog/view/theme/default/template/module/shippingestimate.tpl on line 121
I use a theme not the default template if that has anything to so with it ?
2012-04-25 13:50:46 - PHP Notice: Undefined index: name in /home/y7hkr3t7/public_html/catalog/controller/module/shippingestimate.php on line 98
2012-04-25 13:50:46 - PHP Notice: Undefined index: code in /home/y7hkr3t7/public_html/catalog/controller/module/shippingestimate.php on line 99
There are no error messages in my admin in the google checkout module & no errors mssgs in my google merchant acct either as far as the shipping ?
So Im assuming its because of the above error messages ?
This is a bug in the 3rd party shipping estimate module which has nothing to do with Google Checkout.nickt15 wrote:Hi,
I just checked the error log & I am not a programmer but I have a load of these error message so far today:
2012-04-25 16:35:41 - PHP Notice: Undefined index: route in /home/y7hkr3t7/public_html/catalog/view/theme/default/template/module/shippingestimate.tpl on line 121
I use a theme not the default template if that has anything to so with it ?
2012-04-25 13:50:46 - PHP Notice: Undefined index: name in /home/y7hkr3t7/public_html/catalog/controller/module/shippingestimate.php on line 98
2012-04-25 13:50:46 - PHP Notice: Undefined index: code in /home/y7hkr3t7/public_html/catalog/controller/module/shippingestimate.php on line 99
There are no error messages in my admin in the google checkout module & no errors mssgs in my google merchant acct either as far as the shipping ?
So Im assuming its because of the above error messages ?
Your callback URL (provided you have the SSL) should be https://www.toysandbaby.com/index.php?r ... t/callback
You don't have any messages from Google Checkout, so I am unable to help you wiothout further details.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Users browsing this forum: No registered users and 22 guests