Jump to content
Silverado05

Offical Google Checkout module for osCommerce Support Thread

Recommended Posts

Thanks again for posting. Here is what I did:

 

1) I read that set of posts. My implementation is definitely CGI. I configured .htaccess already but turned off that setting when it id did not work correctly with that setting either and I found the description language in the admin panel somewhat ambiguous. So after reading the posts, I commented out the $Gresponse-HttpAuthentication(); code and turned .httaccess TRUE setting back on in the admin panel.

2) The only one that was TRUE was one that was to block spiders. I changed it to FALSE. Could no find the references in the google forum.

3) Took a look at the mod you recommended. This seems to be to empty the cart when the continue shopping URL is gc_return.php. Mine is set to checkout_success.php, and the cart empties okay, I think. The problem is that it shows the empty cart instead of the Thank You text, etc.

 

Thanks again for your time.

1. You shouldn't have to comment out $Gresponse-HttpAuthentication(); I didn't and it works fine.

2. Its Force Cookie Use, Check User Agent and Check IP Address that interfere with googlecheckout.

3. For some reason, the session is lost when the user returns to your site and therefore isn't logged in, that is why the page returns to shopping_cart.php instead of checkout_success.php.

Share this post


Link to post
Share on other sites
Your /public_html/includes/configure.php file.

Okay, follow the format of the parameters:

 

define('HTTP_COOKIE_DOMAIN', 'www.eofficesupply.biz');

define('HTTP_MAIL_DOMAIN', 'eofficesupply.biz');

define('HTTPS_COOKIE_DOMAIN', 'www.eofficesupply.biz');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

Do you have a SSL certificate? If so, then:

define('ENABLE_SSL', 'true');

If you're using a shared certificate, you have to enter the name of the webserver in:

define('HTTPS_SERVER',

Edited by speed777

Share this post


Link to post
Share on other sites
Okay, follow the format of the parameters:

 

define('HTTP_COOKIE_DOMAIN', 'www.eofficesupply.biz');

define('HTTP_MAIL_DOMAIN', 'eofficesupply.biz');

define('HTTPS_COOKIE_DOMAIN', 'www.eofficesupply.biz');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

Do you have a SSL certificate? If so, then:

define('ENABLE_SSL', 'true');

If you're using a shared certificate, you have to enter the name of the webserver in:

define('HTTPS_SERVER',

SSL

Share this post


Link to post
Share on other sites
Okay, follow the format of the parameters:

 

define('HTTP_COOKIE_DOMAIN', 'www.eofficesupply.biz');

define('HTTP_MAIL_DOMAIN', 'eofficesupply.biz');

define('HTTPS_COOKIE_DOMAIN', 'www.eofficesupply.biz');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

Do you have a SSL certificate? If so, then:

define('ENABLE_SSL', 'true');

If you're using a shared certificate, you have to enter the name of the webserver in:

define('HTTPS_SERVER',

 

Alrighty. I made those changes. But I don't think it is making any change.

 

Notes:

1. I am not using gc_return.php. I am using checkout_success.php

2. No SSL Certificates are being used yet.

3. I cleared my cache and restarted browsers.

4. Sessions in Admin Configuration:

Force Cookie Use False

Check SSL Session ID False

Check User Agent False

Check IP Address False

Prevent Spider Sessions False

Recreate Session False

 

Here is the process:

1. Fill the cart with products (not logged into OSC)

2. Click on GoogleCheckout (login with test sandbox buyer account)

3. Proceed with order. (everything works fine in Google)

4. Click to return to Provato (my store)

5. Shopping_cart.php comes up with the same contents in the cart.

Share this post


Link to post
Share on other sites
Thanks again for posting. Here is what I did:

 

3) Took a look at the mod you recommended. This seems to be to empty the cart when the continue shopping URL is gc_return.php. Mine is set to checkout_success.php, and the cart empties okay, I think. The problem is that it shows the empty cart instead of the Thank You text, etc.

 

Thanks again for your time.

3. For some reason, the session is lost when the user returns to your site and therefore isn't logged in, that is why the page returns to shopping_cart.php instead of checkout_success.php. Post your includes/configure.php file without the database info. Here is the info that I need to see:

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://yourdomain.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');

define('HTTPS_COOKIE_DOMAIN', 'yourdomain.com');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

Share this post


Link to post
Share on other sites

Here is mine:

 

define('HTTP_SERVER', 'http://www.provatostore.com');

define('HTTPS_SERVER', 'https://provatostore.com');

define('ENABLE_SSL', false); <- No SSL is being used at this time.

define('HTTP_COOKIE_DOMAIN', 'www.provatostore.com');

define('HTTPS_COOKIE_DOMAIN', 'provatostore.com');

define('HTTP_COOKIE_PATH', '/home/'); <- These must be set to home, since this is my catalog directory.

define('HTTPS_COOKIE_PATH', '/home/'); <- if I make them '/' then the entire site breaks.

define('DIR_WS_HTTP_CATALOG', '/home/');

define('DIR_WS_HTTPS_CATALOG', '/home/');

 

The path to catalog is: http//www.provatostore.com/home/

Share this post


Link to post
Share on other sites
Here is mine:

 

define('HTTP_SERVER', 'http://www.provatostore.com');

define('HTTPS_SERVER', 'https://provatostore.com');

define('ENABLE_SSL', false); <- No SSL is being used at this time.

define('HTTP_COOKIE_DOMAIN', 'www.provatostore.com');

define('HTTPS_COOKIE_DOMAIN', 'provatostore.com');

define('HTTP_COOKIE_PATH', '/home/'); <- These must be set to home, since this is my catalog directory.

define('HTTPS_COOKIE_PATH', '/home/'); <- if I make them '/' then the entire site breaks.

define('DIR_WS_HTTP_CATALOG', '/home/');

define('DIR_WS_HTTPS_CATALOG', '/home/');

 

The path to catalog is: http//www.provatostore.com/home/

I'm going to run a dummy purchase through, could you leave it on sandbox?

Share this post


Link to post
Share on other sites
I'm going to run a dummy purchase through, could you leave it on sandbox?

 

Yep, no problem. We aren't going live until its all working anyway. :)

Share this post


Link to post
Share on other sites
Yep, no problem. We aren't going live until its all working anyway. :)

I see what you are saying, use the Empty Cart After Transaction addon, it will still work if you put checkout_success.php instead of gc_return.php, I tested it earlier.

Share this post


Link to post
Share on other sites
I see what you are saying, use the Empty Cart After Transaction addon, it will still work if you put checkout_success.php instead of gc_return.php, I tested it earlier.

 

So just add that code to checkout_success.php?

Share this post


Link to post
Share on other sites
So just add that code to checkout_success.php?

Yes, add to the end of text on checkout_success.php, I added it to gc_return.php and it worked, let's see if it works on checkout_success.php:

<?php

$cart->reset(true);

?>

Share this post


Link to post
Share on other sites
Yes, add to the end of text on checkout_success.php, I added it to gc_return.php and it worked, let's see if it works on checkout_success.php:

<?php

$cart->reset(true);

?>

 

I added it here:

 

<!-- body_eof //-->

<?php

$cart->reset(true);

?>

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //--></body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

However it did not work. Which leads me to believe 1 of 2 things...

 

Either

1. The code snippet is not in the correct location within the (checkout_success.php) file.

or

2. Google Checkout isn't reaching and executing checkout_success.php.

Edited by fostertime

Share this post


Link to post
Share on other sites
I added it here:

 

<!-- body_eof //-->

<?php

$cart->reset(true);

?>

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //--></body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

However it did not work. Which leads me to believe 1 of 2 things...

 

Either

1. The code snippet is not in the correct location within the (checkout_success.php) file.

or

2. Google Checkout isn't reaching and executing checkout_success.php.

Try adding here:

<?php

$cart->reset(true);

?>

<!-- body_text_eof //-->

Share this post


Link to post
Share on other sites
Try adding here:

<?php

$cart->reset(true);

?>

<!-- body_text_eof //-->

 

Nope, didn't work.

 

Is it not true that when a user creates an account within google checkout, that user (and their order) are supposed to show up in the Admin?

 

I think the issue here is that there is no user information being returned. Because if I log in with my test user in OSC, and then checkout, I get the correct checkout_success.php page.

Share this post


Link to post
Share on other sites
Nope, didn't work.

 

Is it not true that when a user creates an account within google checkout, that user (and their order) are supposed to show up in the Admin?

 

I think the issue here is that there is no user information being returned. Because if I log in with my test user in OSC, and then checkout, I get the correct checkout_success.php page.

 

I'm about to give up on this thing... haha...

 

It's gotta be something simple that I am missing here. I checked everything 3 different times...

 

The only thing I can think of that I have no tried yet, is to get an SSL and attempt to see if that makes a difference when attempting to get GoogleCheckout to populate the User and Order information to the Admin.

Share this post


Link to post
Share on other sites
1. You shouldn't have to comment out $Gresponse-HttpAuthentication(); I didn't and it works fine.

2. Its Force Cookie Use, Check User Agent and Check IP Address that interfere with googlecheckout.

3. For some reason, the session is lost when the user returns to your site and therefore isn't logged in, that is why the page returns to shopping_cart.php instead of checkout_success.php.

 

1. In the article you sent me which I read and followed, that was the recommended action:

 

Here is what it says:

 

"if so, the basic auth headers cant be accessed from PHP, so u need to set up

an .htaccess file to handle the authentication

 

when the files are created comment the authentication done with PHP"

 

So now I un-commented it and attempted to run a transaction. No errors right away, but I can only get to the first page of checkout. With this setting here is what google checkout reads:

 

"You do not currently have any valid shipping methods."

 

It gets no information from OSC regarding shipping. With the previous setting I at least got the default shipping rates configured in the GC module.

 

2. Those all were false already. Thanks for the info. I till turn the spiders one back on.

 

3. Hmm. I noticed there is no login in to the OSC site if they click Google Checkout. Maybe it is best to troubleshoot this one after item 1 is solved?

Share this post


Link to post
Share on other sites
3. For some reason, the session is lost when the user returns to your site and therefore isn't logged in, that is why the page returns to shopping_cart.php instead of checkout_success.php. Post your includes/configure.php file without the database info. Here is the info that I need to see:

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.yourdomain.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://yourdomain.com'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com');

define('HTTPS_COOKIE_DOMAIN', 'yourdomain.com');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

 

define('HTTP_SERVER', 'http://www.deflixious.com');

define('HTTPS_SERVER', 'https://www.deflixious.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.deflixious.com');

define('HTTPS_COOKIE_DOMAIN', 'www.deflixious.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

I noticed that if you are not logged in, click checkout, then click google checkout you effectively bypass the login page. If you have to be logged in to get the checkout success stuff, then there is our reason. Is/When is the user supposed to be prompted in this process? Without clicking GC, it is the next step in the process.

 

Paypal works correctly and brings the user to the login.php before sending them to paypal.

Share this post


Link to post
Share on other sites
define('HTTP_SERVER', 'http://www.deflixious.com');

define('HTTPS_SERVER', 'https://www.deflixious.com');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'www.deflixious.com');

define('HTTPS_COOKIE_DOMAIN', 'www.deflixious.com');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '/');

 

I noticed that if you are not logged in, click checkout, then click google checkout you effectively bypass the login page. If you have to be logged in to get the checkout success stuff, then there is our reason. Is/When is the user supposed to be prompted in this process? Without clicking GC, it is the next step in the process.

 

Paypal works correctly and brings the user to the login.php before sending them to paypal.

After clicking google checkout button on the cart page, there is nothing in the error log. There is nothing posted to the inegration console in my google account. The google checkout page stops you with the no shipping methods message. No tax is passed to google checkout. Not sure exactly what is supossed to happen, but when recieving the authentication message I at least got default shipping values and tax passed correctly.

 

Thanks for any help. I checked every google checkout related post in the shipping section. Many no questions, no answers.

 

I placed this post in there:

 

1) .htaccess setting set to FALSE

 

With this setting I get the "Failed to Get Basic Authentication Headers" message in the error log and in the integration console. However, default shipping rates configured in Google Checkout Module work and tax is passed to Google checkout correctly. Google checkout completes the checkout process okay but does not post any order info back to OSC. Lastly, Google Checkout does not make the buyer log into the OSC site, so at the end checkout_success.php just shows an empty cart and no thank you message.

 

2) .htaccess setting set to TRUE and .htaccess all configured

 

With this setting I get no errors in the error log. I get no errors in the integration console. But the order does not get far. As soon as I click google checkout and am brought to the GC page I get the message "You do not currently have any valid shipping methods." No shipping info is passed to GC. Also no tax info is passed. You cannot continue with the checkout process.

Share this post


Link to post
Share on other sites

Update:

 

.htaccess setting set to TRUE and .htaccess all configured and is the correct setting for me - thanks for that.

 

As long as the user 1) logs in to OSC manually before ordering and 2) selects an international delivery address on the google checkout page, all is well and everything works !!!! The order posts to google checkout and OSC and the thank you page is shown correctly.

 

However, if I enter a domestic address, I get no errors in the error log. I get no errors in the integration console. But the order does not get far. I get the message "You do not currently have any valid shipping methods." No shipping info is passed to GC. Also no tax info is passed. You cannot continue with the checkout process. You are stuck.

 

So now I have two issues 1) the login issue (or lack of login - issue) and 2) chokes on domestic address.

 

Thanks in advance for any help. Thanks Louis and Speed . . . we are making progress ;)

Share this post


Link to post
Share on other sites
I'm about to give up on this thing... haha...

 

It's gotta be something simple that I am missing here. I checked everything 3 different times...

 

The only thing I can think of that I have no tried yet, is to get an SSL and attempt to see if that makes a difference when attempting to get GoogleCheckout to populate the User and Order information to the Admin.

Have you tried my contribution Empty Cart After Transaction? It won't affect your shopping cart layout because the only file changed is gc_return.php.

Share this post


Link to post
Share on other sites
Update:

 

.htaccess setting set to TRUE and .htaccess all configured and is the correct setting for me - thanks for that.

 

As long as the user 1) logs in to OSC manually before ordering and 2) selects an international delivery address on the google checkout page, all is well and everything works !!!! The order posts to google checkout and OSC and the thank you page is shown correctly.

 

However, if I enter a domestic address, I get no errors in the error log. I get no errors in the integration console. But the order does not get far. I get the message "You do not currently have any valid shipping methods." No shipping info is passed to GC. Also no tax info is passed. You cannot continue with the checkout process. You are stuck.

 

So now I have two issues 1) the login issue (or lack of login - issue) and 2) chokes on domestic address.

 

Thanks in advance for any help. Thanks Louis and Speed . . . we are making progress ;)

Whats your web address for your store? I'll go and try to diagnose whats happening. Set it on sandbox.

Edited by speed777

Share this post


Link to post
Share on other sites

AH HA! I just found this error...

 

I am getting this error in Google Checkout Integration Console:

 

We encountered an error trying to access your server at [url="http://www.provatostore.com/home/googlecheckout/responsehandler.php"]http://www.provatostore.com/home/googleche...onsehandler.php[/url] -- the error we got is Send failed with code: 

500. Response body was: 

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>500 Internal Server Error</title>
</head>
<body>

<h1>Internal Server Error</h1>
<p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p>
<p>Please contact the server administrator, webmaster@provatostore.sanvitos.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p>
<p>More information about this error may be available in the server error log.</p>
<p>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.provatostore.com Port 80</address>

</body>
</html>

 

Any idea what this error is caused by?

 

Here is the server error log:

 

[10/Mar/2009:10:59:07 -0600] "POST /home/googlecheckout/responsehandler.php HTTP/1.0" 404 5732 "-" "Google Checkout Notification Agent 1.0"
64.204.30.144 - - 

[10/Mar/2009:10:59:08 -0600] "GET /home/checkout_success.php HTTP/1.1" 302 526 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7"
64.204.30.144 - - 

[10/Mar/2009:10:59:08 -0600] "GET /home/shopping_cart.php HTTP/1.1" 200 28279 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7"
64.204.30.144 - - 

[10/Mar/2009:10:59:08 -0600] "GET /home/images/bg_top.jpg HTTP/1.1" 404 839 "http://www.provatostore.com/home/stylesheet.css" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7"
64.125.64.136 - - 

[10/Mar/2009:10:59:44 -0600] "POST /home/googlecheckout/responsehandler.php HTTP/1.0" 404 5732 "-" "Google Checkout Notification Agent 1.0"
64.125.64.136 - - [10/Mar/2009:11:01:55 -0600] "POST /home/googlecheckout/responsehandler.php HTTP/1.0" 404 5732 "-" "Google Checkout Notification Agent 1.0"
64.125.64.136 - - 

[10/Mar/2009:11:04:36 -0600] "POST /home/googlecheckout/responsehandler.php HTTP/1.0" 404 4319 "-" "Google Checkout Notification Agent 1.0"

Edited by fostertime

Share this post


Link to post
Share on other sites

500. Response body was:

 

Apparently, your responsehandler.php is failing. Now the question is why. troublehooter I tried to make a responsehandler tool available but it won't access my server. Its available somewhere on the google forums.

Edited by speed777

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×