Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Offical Google Checkout module for osCommerce Support Thread


Silverado05

Recommended Posts

No need to post new code, just use the google version off the google server as I discussed many posts before... If you cannot get it to work then I would suggest you contact google like I said before and explain your specific problems, then post your solutions in the forum so it benefits everyone instead of sitting on your lazy ass and complaining. Also FYI last I knew google checkout only works for the US, and your profile says you are from the UK, that might be part of your problem but you didn't take the time to read the directions so you wouldn't know that...

 

Hi

 

1, what is "FYI"?

2, "google checkout only works for the US"? google chechout is offered to the uk. or do you mean this mod is not for the UK?

 

and for my GC mod "not working" it is 90% working orders go to GC but with no errors orders do not come back from GC unless I use HTTP in test mod and all workes then but as live need HTTPS and it is not my SSL GC have ok that and there is no errors at GC admin?

Link to comment
Share on other sites

  • Replies 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

also "then post your solutions in the forum so it benefits everyone" see my offer if you do not think this would help everyone then you need to think before you post not good things about us? (just to let you no I have spent all this weekend helping others on this forum without sleep. so I am not "instead of sitting on your lazy ass and complaining")

Link to comment
Share on other sites

I have installed this module and like so many others I can process the orders through Google and it works perfectly, however no information is getting passed back to into the OSC Admin Screen.

Currently I am only testing using the Google Sandbox checkout - Does this have an implication? If I switch to live would it work?

 

If I look at the Sandbox Google Integration Console I get the following error message:

We encountered an error trying to access your server at http://www.stimul8health.co.uk/googlecheck...nsehandler.php; the error we got is: Send failed with code: 500. Response body was: Shopping cart not obtained from session.

 

I've had a look through this thread and can't really see a finalised solution to the lack of communication between google and OSC - Have I missed something in this thread and if so can someone please point me to the right posting.

 

 

Also if I go to the following Url (obviously changing the your site url) I get asked for a username and password

http://<url-site-url>/googlecheckout/responsehandler.php

Should that happen because in the Read Me it only mentions that if I get a 'Invalid or not supported Message', go to the next section.

 

Can someone please help me or point me in the right direction.

 

Many thanks

nate

Link to comment
Share on other sites

I have installed this module and like so many others I can process the orders through Google and it works perfectly, however no information is getting passed back to into the OSC Admin Screen.

Currently I am only testing using the Google Sandbox checkout - Does this have an implication? If I switch to live would it work?

 

If I look at the Sandbox Google Integration Console I get the following error message:

We encountered an error trying to access your server at http://www.stimul8health.co.uk/googlecheck...nsehandler.php; the error we got is: Send failed with code: 500. Response body was: Shopping cart not obtained from session.

 

I've had a look through this thread and can't really see a finalised solution to the lack of communication between google and OSC - Have I missed something in this thread and if so can someone please point me to the right posting.

 

 

Also if I go to the following Url (obviously changing the your site url) I get asked for a username and password

http://<url-site-url>/googlecheckout/responsehandler.php

Should that happen because in the Read Me it only mentions that if I get a 'Invalid or not supported Message', go to the next section.

 

Can someone please help me or point me in the right direction.

 

Many thanks

nate

 

1) "I have installed this module and like so many others I can process the orders through Google and it works perfectly, however no information is getting passed back to into the OSC Admin Screen." this is why I posted my offer above so we then hade not only a working code but a working demo site then others could ftp and copy the code? but it need someone with a working GC to help us all out?

 

2)"I get asked for a username and password

http://<url-site-url>/googlecheckout/responsehandler.php" the username = Sandbox Merchant ID and password = Sandbox Merchant Key if in sandox or Production Merchant ID & Production Merchant Key if in live .

Link to comment
Share on other sites

1) "I have installed this module and like so many others I can process the orders through Google and it works perfectly, however no information is getting passed back to into the OSC Admin Screen." this is why I posted my offer above so we then hade not only a working code but a working demo site then others could ftp and copy the code? but it need someone with a working GC to help us all out?

 

2)"I get asked for a username and password

http://<url-site-url>/googlecheckout/responsehandler.php" the username = Sandbox Merchant ID and password = Sandbox Merchant Key if in sandox or Production Merchant ID & Production Merchant Key if in live .

 

 

Cheers Simon.

Link to comment
Share on other sites

I had followed all the instructions in the read me and installation file and I was having the same problems it seems as everyone else - the orders would be taken by google but not added to the OSC admin system.

 

I got the usual errors in the GC console - invalid or not supported message etc

 

But, I have just revisited the contribution page and found the some SQL I hadn't added to the database (See end of post) and then placed another order through the sandbox checkout - and it worked. The order was added to my orders screen in OSC. I think I did actually dance a little jig when it appeared.

 

I somehow managed to miss this bit originally, but it does seem like a lot of us have the same issue and I can't imagine that it was just me who forgot to update their DB following code (though it is possible).

Anyway, incase you haven't tried this I hope it helps.

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

 

CREATE TABLE IF NOT EXISTS `google_orders` (

`orders_id` int(11) default NULL,

`google_order_number` bigint(20) default NULL,

`order_amount` decimal(15,4) default NULL

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

CREATE TABLE IF NOT EXISTS `google_checkout_logs` (

`google_checkout_logs_id` int(11) NOT NULL auto_increment,

`message_type` varchar(255) NOT NULL default '',

`msg_time` datetime NOT NULL default '0000-00-00 00:00:00',

`google_order_id` varchar(255) NOT NULL default '',

`xml` text NOT NULL,

`orders_id` int(11) default NULL,

PRIMARY KEY (`google_checkout_logs_id`),

KEY `orders_id` (`orders_id`),

KEY `google_order_id` (`google_order_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

 

 

CREATE TABLE IF NOT EXISTS `google_checkout` (

`customers_id` int(11) default NULL,

`buyer_id` bigint(20) default NULL

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

Link to comment
Share on other sites

Hi

 

we must of been working on this at the same time.

 

I have also got it working with:

 

Force Cookie Use = True (ie not showing the ?osCsid= in the url)

 

I will to night do a demo site with RC2 if you all think it may help?

Link to comment
Share on other sites

I had followed all the instructions in the read me and installation file and I was having the same problems it seems as everyone else - the orders would be taken by google but not added to the OSC admin system.

 

I got the usual errors in the GC console - invalid or not supported message etc

 

But, I have just revisited the contribution page and found the some SQL I hadn't added to the database (See end of post) and then placed another order through the sandbox checkout - and it worked. The order was added to my orders screen in OSC. I think I did actually dance a little jig when it appeared.

 

I somehow managed to miss this bit originally, but it does seem like a lot of us have the same issue and I can't imagine that it was just me who forgot to update their DB following code (though it is possible).

Anyway, incase you haven't tried this I hope it helps.

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

 

CREATE TABLE IF NOT EXISTS `google_orders` (

`orders_id` int(11) default NULL,

`google_order_number` bigint(20) default NULL,

`order_amount` decimal(15,4) default NULL

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

CREATE TABLE IF NOT EXISTS `google_checkout_logs` (

`google_checkout_logs_id` int(11) NOT NULL auto_increment,

`message_type` varchar(255) NOT NULL default '',

`msg_time` datetime NOT NULL default '0000-00-00 00:00:00',

`google_order_id` varchar(255) NOT NULL default '',

`xml` text NOT NULL,

`orders_id` int(11) default NULL,

PRIMARY KEY (`google_checkout_logs_id`),

KEY `orders_id` (`orders_id`),

KEY `google_order_id` (`google_order_id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

 

 

CREATE TABLE IF NOT EXISTS `google_checkout` (

`customers_id` int(11) default NULL,

`buyer_id` bigint(20) default NULL

) ENGINE=MyISAM DEFAULT CHARSET=latin1;

 

Hi

 

I had update my DB with this and it still was not working.

untill I did this:

 

Looks like there is another potential solution to the problem I was having. I found it in the Google Groups, but the thread title was highly misleading. It was suggested over there that you could redefine the Prevent Spider Sessions setting for responsehandler.php only. Here's a quote of what was said over there:

 

 

 

Ropu responded by saying that would throw up a warning, and suggested adding this to prevent the warning from appearing:

 

error_reporting(0);

 

I haven't tested this yet, but I do have an observation. From looking at the code, it's quite obvious that the "Prevent Spider Sessions" option has no effect whatsoever on Google Checkout, as long as 'google checkout notification agent 1.0' is not in your spiders.txt file. In fact, if you have "Force Cookie Use" set to TRUE, then the code behind "Prevent Spider Sessions" doesn't even run. Up to this point the real solution to getting GC to work is to set "Force Cookie Use" to FALSE, but that is a terrible solution for many reasons. That option should always be set to TRUE if possible. So the solution is to set it to FALSE only in responsehandler.php. That can be done just the same as was suggested for "Prevent Spider Sessions", like this:

 

1.) Open up resonsehandler.php

 

2.) Search for error_reporting(E_ALL); and change it to error_reporting(0);

 

3.) Search for define('MODULE_PAYMENT_GOOGLECHECKOUT_MULTISOCKET', 'False');

 

4.) Immediately below it add this: define('SESSION_FORCE_COOKIE_USE', 'False');

 

 

I have not tested this at all, but it appears to be a better solution than what I came up with, because it does not rely on knowing what the user agent is for Google Checkout. The only thing that should ever be connecting to responsehandler.php is Google Checkout, so there are no worries about starting a session for a search spider or anything like that. In fact, if you have it properly password protected via .htaccess, nothing else can get to it. I will test this out to see if it works. If so, then I will recommend using this solution instead of my previous one.

 

then it all worked for me

Edited by West One Hosting
Link to comment
Share on other sites

I am having an issue where google checkout (normal, not ipn) will not subtract the products stock when using qtpro. I am not sure why this is happening. Can someone point me in the right direction for clearing this up?

Link to comment
Share on other sites

Guys my GCO has been working fine for months but recently its showing the £1 shipping instead of calculating.

 

I get this error in console Error parsing XML; message from parser is: The markup in the document following the root element must be well-formed

 

<br />

<b>Fatal error</b>: Cannot redeclare class rmfirst in <b>/home2/smoothzo/public_html/catalog/includes/modules/shipping/rmfirst.php</b> on line <b>8</b><br />

 

I have not touched it the install and it used to work fine before.

 

I have tested it and when i try it works but when customers order it showing £1 for shipping, its happened in the last 4 orders using google checkout.

 

some one help me or advise me why this is randomly happening now?

 

thanks

Link to comment
Share on other sites

Guys my GCO has been working fine for months but recently its showing the £1 shipping instead of calculating.

 

I get this error in console Error parsing XML; message from parser is: The markup in the document following the root element must be well-formed

 

<br />

<b>Fatal error</b>: Cannot redeclare class rmfirst in <b>/home2/smoothzo/public_html/catalog/includes/modules/shipping/rmfirst.php</b> on line <b>8</b><br />

 

I have not touched it the install and it used to work fine before.

 

I have tested it and when i try it works but when customers order it showing £1 for shipping, its happened in the last 4 orders using google checkout.

 

some one help me or advise me why this is randomly happening now?

 

thanks

 

I am by no means a google checkout expert, just experienced in my own errors. It is probably something messed up in your shipping file. Since you havent touched it.

 

Try this, uninstall google checkout in your admin (remember to have all the info in there saved somewhere -copy and paste it all into notepad so you can quickly add it back in). Analyze and optimize your database. Run the shipping generator again (http://www.YOURSITE.com/googlecheckout/shipping_generator/shipping_method_generator.php) copy and paste that code into googlecheckout/shipping_methods.php. Reinstall google checkout.

 

I have no idea if that will help, but if you havent changed any files it may. At least its a starting point.

 

I can also give this one piece of advice to all since I've done this repeatedly. Watch what you add to the spiders.txt (in the includes) you might break google checkout. Always check to be sure your google checkout is working if you add to this file ;)

Link to comment
Share on other sites

  • 2 weeks later...

Okay, I'm sure I'm being incredibly stupid here...

 

The only shipping module we have active is table rate. It's working fine on normal OSC checkout. With GCO, no prices are passed to Google.

 

I'm assuming I have to do something at shipping_method_generator.php but for the life of me I cannot see how to put a table rate into that page...

 

Can someone please give me a pointer or two? Thanks.

Link to comment
Share on other sites

Further to the above, the information from shipping_method_generator.php is being passed correctly in terms of the shipping *method*, but the prices remain at 0.00 for both domestic and international deliveries. I'm tearing my hair out here and the client is getting - frankly - snotty about it. If anyone can help, I will be more grateful than I can ever say.

Link to comment
Share on other sites

Further to the above, the information from shipping_method_generator.php is being passed correctly in terms of the shipping *method*, but the prices remain at 0.00 for both domestic and international deliveries. I'm tearing my hair out here and the client is getting - frankly - snotty about it. If anyone can help, I will be more grateful than I can ever say.

 

I had issues with table rates and had to rename the table file to domestic.php. First I uninstalled the table rate, renamed all the files (languange files too) uninstalled google checkout (just in the admin) reinstalled the table rate, ran the shipping generator, then reinstalled google.

 

My experience was that the name "table" was causing the issue. It was the same file with the same code, just a new name and it worked fine.

Link to comment
Share on other sites

Further to the above, the information from shipping_method_generator.php is being passed correctly in terms of the shipping *method*, but the prices remain at 0.00 for both domestic and international deliveries. I'm tearing my hair out here and the client is getting - frankly - snotty about it. If anyone can help, I will be more grateful than I can ever say.

 

One more thing: if I go to responsehandler.php in a browser, I get the message "Failed to Get Basic Authentication Headers"... what does that mean?

Link to comment
Share on other sites

I am trying to figure out what the latest version of Google Checkout is, because there is a ton of entries with updates and fixes but nothing really saying full package.

 

Is the version uploaded by "mrchain" on 31 Jan 2008 the latest stable version or should i use an earlier version?

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Hey guys I posted in the main forum aswell in fear of being overlooked but it seems thats exactly whats happened so anyway on with my problem,

My cart seems to be working fine until I goto checkout and then all the items in the cart which I had previously added dissapear but when I goto another page i.e not checkout or login, the items return in the cart also when I try to sign in it says it comes up as secureserver.com/store when it should be secureserver.com/mystore.com/store.

 

I tried changing a few files like checkout.php, login.php & gcheckout.php but I don't have any idea what exactly I'm supposed to change.

 

Any ideas?

Link to comment
Share on other sites

Right, well I might have an answer to why this just doesn't work for some people.

 

My client had picked bargain basement shared hosting, on which the function PHP_AUTH_USER is not available. One to check.

Link to comment
Share on other sites

Is that directed at me or a previous enquiry?

 

If not can you please help me also :P , thanks

Right, well I might have an answer to why this just doesn't work for some people.

 

My client had picked bargain basement shared hosting, on which the function PHP_AUTH_USER is not available. One to check.

Link to comment
Share on other sites

It's directed at my own post which is two above yours.

 

Haven't got a clue what your problem is... did you check that configure.php has the right info?

Link to comment
Share on other sites

Hi,

 

 

I am not able to implement the google checkout callback. The error shown is

 

We encountered an error trying to access your server at http://212.241.216.213/staging1/googlechec...onsehandler.php -- the error we got is: Send failed with code: 401. Response body was: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML> <HEAD> <TITLE>401 Authorization Required</TITLE> </HEAD> <BODY> <H1>Authorization Required</H1> <P>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.</p> <HR /> <ADDRESS> Web Server at grehom.co.uk </ADDRESS> </BODY> </HTML> <!-- - Unfortunately, Microsoft has added a clever new - "feature" to Internet Explorer. If the text of - an error's message is "too small", specifically - less than 512 bytes, Internet Explorer returns - its own error message. You can turn that off, - but it's pretty tricky to find switch called - "smart error messages". That means, of course, - that short error messages are censored by default. - IIS always returns error messages that are long - enough to make Internet Explorer happy. The - workaround is pretty simple: pad the error - message with a big comment like this to push it - over the five hundred and twelve bytes minimum. - Of course, that's exactly what you're reading - right now. -->

 

Can somebody please guide me how to implement the callback for googlecheckout.

 

Will I be able to reduce the product quantity as well after the successfull order when the callback is implemented?

 

Please help.

 

Thanks and Regards,

Satwinder

Link to comment
Share on other sites

I am having a little problem integrating Google Checkout with my current osC store.

 

I am using osC RC2a which I have modifed moderately. My problem comes with the instructions for catalog/login.php.

 

The instructions states to replace

<td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				  </tr>
				</table></td>
			  </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
</table></form></td>

with

<td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td></form>
				  </tr>
				</table></td>
			  </tr>
			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table>
<?php
// ** GOOGLE CHECKOUT **
// Checks if the Google Checkout payment module has been enabled and if so 
// includes gcheckout.php to add the Checkout button to the page 
if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') && MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') {
  include_once('googlecheckout/gcheckout.php');
} 
// ** END GOOGLE CHECKOUT **			
?>
	</td>
  </tr>
</table></td>

But my code looks like this.

<?php // +Login Page a la Amazon ?>
		<td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2">
			<tr>
			  <td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">
				  <tr>
					<td class="main"><b><?php echo TEXT_EMAIL_QUERY; ?></b></td>
				  </tr>
				  <tr>
					<td class="main"><?php echo TEXT_EMAIL_IS . ' ' . tep_draw_input_field('email_address'); ?></td>
				  </tr>
				  <tr>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
				  </tr>
				  <tr>
					<td class="main"><b><?php echo TEXT_HAVE_PASSWORD; ?></b></td>
				  </tr>
				  <td class="main"><?php echo tep_draw_radio_field('new_customer','Y',false) . ' ' . TEXT_HAVE_PASSWORD_NO ?> </td>
				  </tr>
				  <tr>
					<td class="main"><?php echo tep_draw_radio_field('new_customer','N',true) . ' ' . TEXT_HAVE_PASSWORD_YES . ' ' .
					tep_draw_password_field('password','','maxlength="40"'); ?> </td>
				  </tr>
				  <tr>
					<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
						<tr>
						  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
						  <td align="left"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
						  <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
						</tr>
					  </table></td>
				  </tr>
				  <tr>
					<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
				  </tr>
				  <tr>
					<td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') .
					   '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></td>
				  </tr>
				  <tr>
					<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
				  </tr>
				</table></td>
			</tr>
		  </table></td>
		<td width="10%"></td>
		<td width="40%" height="100%" valign="top"><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
			<tr class="infoBoxHeading">
			  <td class="infoBoxHeading"><?php echo TEXT_NEW_CUSTOMER; ?></td>
			</tr>
			<tr class="infoBoxContents">
			  <td valign="top"><table border="0" width="100%"  cellspacing="0" cellpadding="2">
				  <tr>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
				  </tr>
				  <tr>
					<td class="main"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?></td>
				  </tr>
				</table></td>
			</tr>
		  </table></td>
<?php // -Login Page a la Amazon ?>
	  </tr>
	</table></td>
  </tr>
</table></form></td>

Am I right in thinking i should just add the

	<?php
// ** GOOGLE CHECKOUT **
// Checks if the Google Checkout payment module has been enabled and if so 
// includes gcheckout.php to add the Checkout button to the page 
if (defined('MODULE_PAYMENT_GOOGLECHECKOUT_STATUS') && MODULE_PAYMENT_GOOGLECHECKOUT_STATUS == 'True') {
  include_once('googlecheckout/gcheckout.php');
} 
// ** END GOOGLE CHECKOUT **			
?>

before the last set of

</td>

</tr>

</table></form></td>

and if so where should I move the ending form tag?

Edited by Eighteen48

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...