Jump to content
Silverado05

Offical Google Checkout module for osCommerce Support Thread

Recommended Posts

hey speed,

 

thanks for the link

do you think i should change

 

// Third party tracking

$tracking_attr_types = array(

'buyer-id' => 'buyer-id',

'order-id' => 'order-id',

'order-subtotal' => 'order-subtotal',

'order-subtotal-plus-tax' => 'order-subtotal-plus-tax',

'order-subtotal-plus-shipping' => 'order-subtotal-plus-shipping',

'order-total' => 'order-total',

'tax-amount' => 'tax-amount',

'shipping-amount' => 'shipping-amount',

'coupon-amount' => 'coupon-amount',

'coupon-amount' => 'coupon-amount',

'billing-city' => 'billing-city',

'billing-region' => 'billing-region',

'billing-postal-code' => 'billing-postal-code',

'billing-country-code' => 'billing-country-code',

'shipping-city' => 'shipping-city',

'shipping-region' => 'shipping-region',

'shipping-postal-code' => 'shipping-postal-code',

'shipping-country-code' => 'shipping-country-code',

);

or

 

$Gcart->AddThirdPartyTracking(MODULE_PAYMENT_GOOGLECHECKOUT_3RD_PARTY_TRACKING,

$tracking_attr_types);

 

i tried replacing the 1st one with the parameters code, but it doesn't work

thanks soo much!

 

 

 

nnclyn,

 

my google Carrier Calculater Shipping Configuration only shows domestic also, but i don't have intl enabled.

Edited by natasha21

Share this post


Link to post
Share on other sites
hey speed,

 

thanks for the link

do you think i should change

 

// Third party tracking

$tracking_attr_types = array(

'buyer-id' => 'buyer-id',

'order-id' => 'order-id',

'order-subtotal' => 'order-subtotal',

'order-subtotal-plus-tax' => 'order-subtotal-plus-tax',

'order-subtotal-plus-shipping' => 'order-subtotal-plus-shipping',

'order-total' => 'order-total',

'tax-amount' => 'tax-amount',

'shipping-amount' => 'shipping-amount',

'coupon-amount' => 'coupon-amount',

'coupon-amount' => 'coupon-amount',

'billing-city' => 'billing-city',

'billing-region' => 'billing-region',

'billing-postal-code' => 'billing-postal-code',

'billing-country-code' => 'billing-country-code',

'shipping-city' => 'shipping-city',

'shipping-region' => 'shipping-region',

'shipping-postal-code' => 'shipping-postal-code',

'shipping-country-code' => 'shipping-country-code',

);

or

 

$Gcart->AddThirdPartyTracking(MODULE_PAYMENT_GOOGLECHECKOUT_3RD_PARTY_TRACKING,

$tracking_attr_types);

 

i tried replacing the 1st one with the parameters code, but it doesn't work

thanks soo much!

 

 

 

nnclyn,

 

my google Carrier Calculater Shipping Configuration only shows domestic also, but i don't have intl enabled.

I think they are talking about adding parameterized-urls & url-parameter names like this:

<merchant-checkout-flow-support>

<parameterized-urls>

<parameterized-url

url="http://www.example.com/track?partner=123&partnerName=Bob's%20Shop">

<parameters>

<url-parameter name="taxes" type="tax-amount"/>

<url-parameter name="shipping" type="shipping-amount"/>

</parameters>

</parameterized-url>

</parameterized-urls>

...

</merchant-checkout-flow-support>

 

So, substitute your info like this example:

<merchant-checkout-flow-support>

<parameterized-urls>

<parameterized-url

url="http://www.your_tracking_URL.com/track?partner=123&partnerName=Bob's%20Shop">

<parameters>

<url-parameter name="buyer-id" type="buyer-id"/>

...

</parameters>

</parameterized-url>

</parameterized-urls>

...

</merchant-checkout-flow-support>

Edited by speed777

Share this post


Link to post
Share on other sites

I've seen this issue on many posts. I also had it with the previous version of google checkout.

 

My problem:

When an order is placed it "sometimes" showes up under administration in oscommerce.

 

Not sure if it is google checkout contribution, oscommerce software, or the server that my site is on.

 

I am only using the sandbox account.

 

What seems to be the case is the following;

 

Callback method: XML

1) Place an order.

RESULT: Get the page that says "Thanks, you're done! Return to (my oscommerce site)."

2) Click on link to return to my oscommerce site.

RESULT: Sent to ".../catalog/login.php"

Should have been sent to "/catalog/gc_return.php?products_id=28"

 

The order shows in "/googlecheckout/logs/respons_message.log" properly.

No errors are reported in "/googlecheckout/logs/response_error.log"

 

Order does not display in oscommerce Administration.

 

Callback method: HTML

1) Place a NEW order. Pretend it is order number xxx123

RESULT: Get the page that says "Thanks, you're done! Return to "your oscommerce site".

2) Click on link to return to the oscommerce site.

RESULT: Sent to "/catalog/gc_return.php?products_id=28"

 

The order shows (I believe incorrectly) all on a single line in "/googlecheckout/logs/respons_message.log"

The error mesage "Invalid or not supported Message" is reported in "/googlecheckout/logs/response_error.log"

 

3) Switch callback method to XML

RESULT: after some time has passed

The order number xxx123 shows in "/googlecheckout/logs/respons_message.log" properly.

No errors are reported in "/googlecheckout/logs/response_error.log"

The order number xxx123 is shown in oscommerce's Admistration orders section.

Share this post


Link to post
Share on other sites

Hello,

 

I've installed a new test version of osC v2.2, RC 2a, and wanted to give the new Google Checkout installer a try...

 

Recently Google created an automated deployment app that installs the module for you by looking for the appropriate PHP insertion points and adding the code where it's needed:

 

http://code.google.com/p/google-checkout-o...uickStart_1_5_0

 

I wanted to try the installation script on my linux web server by running the install.sh. I have SSH installed on the server, but not sure where to put the Google-checkout-oscommerce-export files (shown below) in my server directory?

 

1) catalog folder - these are gc update install files

2) install.bat

3) install.sh

4) tools

 

I was thinking in calalog/, or maybe catalog/admin/includes/modules...

 

Has anyone tried this install.sh script on linux?

 

thanks, sM

Share this post


Link to post
Share on other sites

I have installed Google checkout 1.5.0. The Cart links to Google Sandbox, orders are logged in, email confirmations are sent to buyer and seller, return to catalog link to gc_return.php....all works flawlessly,

 

However, I have not been able to get the orders to show in admin.

 

In google sandbox I have set the settings > integration > API callback URL to:

http://domain/catalog/googlecheckout/responsehandler.php,

callback method: xml... but records are not sent, I know I'm missing something....

 

thanks for any help with this....

Share this post


Link to post
Share on other sites

Hey guys,

 

I have just installed the v.15 and it all now seems to be working right up until you try to go to confirm order and it just takes you back to the cart section. It's like it's on a loop or something. Also in the admin it will not set to live despite clicking the live button, it just keeps saying it's on sandbox. Any ideas would be great to keep the wolves away! :D

Share this post


Link to post
Share on other sites

Google checkout is not a payment processor... It's an alternation checkout method, or like express pay. Customers don't have to register with your site to use Google Checkout and it's only available in the shopping cart, all orders are sent to Google Checkout for processing.

 

Also in the admin it will not set to live despite clicking the live button, it just keeps saying it's on sandbox.

Have you setup your merchant key and id for production in admin and google account?

Share this post


Link to post
Share on other sites
Google checkout is not a payment processor... It's an alternation checkout method, or like express pay. Customers don't have to register with your site to use Google Checkout and it's only available in the shopping cart, all orders are sent to Google Checkout for processing.

 

 

Have you setup your merchant key and id for production in admin and google account?

 

Hi,

 

Thanks for a speedy reply. Can you explain exactly what you mean by it is not a payment processor? I have the merchant key and ID. What can I do so it will process payments?

Share this post


Link to post
Share on other sites

Hi

Can you explain exactly what you mean by it is not a payment processor?

It does not work like most OSC payment modules where users have to sign in then are taken through > delivery > payment > confirmation > finished....

 

Google Checkout button just sits on the cart under the OSC checkout button as an optional payment method. When you clickon the Google Checkout button it takes you away from the site to Google Checkout. All user info, CC, shipping is done from Google.

I have the merchant key and ID. What can I do so it will process payments?

If you are in development make sure you setup a Google sandbox selling account first then go to settings > integration and get your merchant id and merchant key.

 

You then need to setup another Google sandbox buying account for testing.

 

Then download the Google Checkout mod, I used v1.5

 

http://code.google.com/p/google-checkout-o.../downloads/list

 

I used the manual method because I'm on linux server the deploy app. uses SSH and command line install and found it easier just to upload the GC files to the server. Once the new files are uploaded to the server just go to admin > modules and install the Google Checkout payment mod. There's great install instructions at:

 

http://code.google.com/p/google-checkout-o...uickStart_1_5_0

 

Then there's more to do like setting up API callback, and shipping, after this is done you can switch / setup your live GC account and start selling, I'm still in sandbox dev mode....

 

_sM

Share this post


Link to post
Share on other sites

Ok I updated the files from google1.4 to goolgecheck out to 1.5 hoping to fix the shipping problem I have been having.

I had google shipping was working but it only would charge one price I couldn't figure out how to charge different prices for different items.. anyway so Ithought I would upgrade to the lasted one. and now I can't do anything because I get this error.

 

Fatal error: Call to undefined function gc_cfg_select_shipping() in /home/hera/public_html/shop/admin/modules.php(217) : eval()'d code on line 1

 

I hope someone can help.

thankyou

Noppie


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites

I got the below fixed now I have a really strange problem

 

I reloaded all the files and got rid the of the error below.. that was because I didn't have the correct file in modules/payments.

and now I get this when I go to add merchant keys and suchnormal_Screenshot-7.png

you can see in this picture there is a link that is not closed off.. and I have looked in the module/payments/googlecheckout.php

at no avail. I am not a php programmer so I could have missed something.

all I know is it should look like this; edit_options.png

 

and anyone give me a hit where to look.. I am baffled.

noppie

 

 

 

 

 

 

 

 

 

 

 

Ok I updated the files from google1.4 to goolgecheck out to 1.5 hoping to fix the shipping problem I have been having.

I had google shipping was working but it only would charge one price I couldn't figure out how to charge different prices for different items.. anyway so Ithought I would upgrade to the lasted one. and now I can't do anything because I get this error.

 

Fatal error: Call to undefined function gc_cfg_select_shipping() in /home/hera/public_html/shop/admin/modules.php(217) : eval()'d code on line 1

 

I hope someone can help.

thankyou

Noppie


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites

My guess is you missed something in your install...or something in php syntax got mixed... my code ...

 

near admin/modules line #15

require('includes/application_top.php');

 // *** BEGIN GOOGLE CHECKOUT ***
 require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules1.php');
 // *** END GOOGLE CHECKOUT ***

 

On catalog/includes/modules/payment/googlecheckout.php near line #263 is

function install() {
global $language;
require_once(DIR_FS_CATALOG . 'includes/languages/' . $language . '/modules/payment/googlecheckout.php');
tep_db_query(
	"ALTER TABLE ". TABLE_CONFIGURATION 
	. " CHANGE `configuration_value` `configuration_value` TEXT NOT NULL");

// Options will appear in the same order as we insert them in the code
// if we increment this variable each time.
$sort_order = 0;

and near line #280 is

	$this->insertConfiguration(
	"For more options, see the " . $this->getOscLink("Advanced Configuration Dashboard", "gc_dashboard.php"),
	'MODULE_PAYMENT_GOOGLECHECKOUT_LINK',
	'',
	'',		
	$sort_order++,
	'tep_cfg_select_option(array(),');

 

Also check/make sure you've got v1.5 versions

 

catalog/admin/gc_dashboard.php

catalog/googlecheckout folder installed

 

Not sure but hope this may help?

Share this post


Link to post
Share on other sites
My guess is you missed something in your install...or something in php syntax got mixed... my code ...

 

near admin/modules line #15

require('includes/application_top.php');

 // *** BEGIN GOOGLE CHECKOUT ***
 require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules1.php');
 // *** END GOOGLE CHECKOUT ***

 

On catalog/includes/modules/payment/googlecheckout.php near line #263 is

function install() {
global $language;
require_once(DIR_FS_CATALOG . 'includes/languages/' . $language . '/modules/payment/googlecheckout.php');
tep_db_query(
	"ALTER TABLE ". TABLE_CONFIGURATION 
	. " CHANGE `configuration_value` `configuration_value` TEXT NOT NULL");

// Options will appear in the same order as we insert them in the code
// if we increment this variable each time.
$sort_order = 0;

and near line #280 is

	$this->insertConfiguration(
	"For more options, see the " . $this->getOscLink("Advanced Configuration Dashboard", "gc_dashboard.php"),
	'MODULE_PAYMENT_GOOGLECHECKOUT_LINK',
	'',
	'',		
	$sort_order++,
	'tep_cfg_select_option(array(),');

 

Also check/make sure you've got v1.5 versions

 

catalog/admin/gc_dashboard.php

catalog/googlecheckout folder installed

 

Not sure but hope this may help?

 

thank you so much for your relpy,.

No that didn't help I have a lot mods on my store..but I uploaded your version of the admin/modules.php

I deleted and reloaded the catalog/googlecheckout.

 

I did everything I can think of.. I when through all the files and reloaded.. I didn't see where there is a new database files.. did any of that changed..

I am going to load in a different domain. a osc cart and load te googlecheckout there to see what happens and compare the two.

 

Now I didn't use the installer because I use linux ubuntu.

I hope that didn't effect anything..

again thank you for the quick reply

noppie


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites
I uploaded your version of the admin/modules.php

oops...There is some additional google code in admin/modules.php near line #50 I missed in last post, see below:

 

admin/modules line #15

require('includes/application_top.php');

 // *** BEGIN GOOGLE CHECKOUT ***
 require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules1.php');
 // *** END GOOGLE CHECKOUT ***

 

Also in :

admin/modules near line #50

	  case 'save':
	// *** BEGIN GOOGLE CHECKOUT ***
	require(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules2.php');
	// *** END GOOGLE CHECKOUT ***
	tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));

 

I did option B install on a clean test osC catalog because there are no deployment app. instructions for linux

 

google v1.5 is for osCommerce v2.2, RC 2a only, is this your version?

 

If you are upgrading from a previous version of this module, google read me says be sure to uninstall and reinstall the module in the osCommerce admin console after you deploy the source code (by clicking "uninstall" and then "install"). This ensures that the database tables are adjusted appropriately. So there must be changes to the db tables, configuration

 

my v1.5 db tables are:

 

google_checkout

google_configuration

google_orders

 

Are you getting an install button in admin > modules > payment > for the google checkout module?

Share this post


Link to post
Share on other sites

When I go to admin > Customers > Orders I get this error :

 

Parse error: syntax error, unexpected T_CASE in /public_html/catalog/admin/orders.php on line 342

 

any suggestions?

 

Thanks

 

Lisa

Share this post


Link to post
Share on other sites
When I go to admin > Customers > Orders I get this error

T_CASE errors are relating to switch statements, usually referring to a missing "}" , or single/double quote, missing ";" or ":", or maybe the preceding case statement is not ended properly with a break statement. Compare your backup with your working file and look for something you may have deleted when you added the new install code, the cause is always somewhere above your error message line number ....342...in admin/orders.php

Edited by h2oHOH

Share this post


Link to post
Share on other sites
oops...There is some additional google code in admin/modules.php near line #50 I missed in last post, see below:

 

admin/modules line #15

require('includes/application_top.php');

 // *** BEGIN GOOGLE CHECKOUT ***
 require_once(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules1.php');
 // *** END GOOGLE CHECKOUT ***

 

Also in :

admin/modules near line #50

	  case 'save':
	// *** BEGIN GOOGLE CHECKOUT ***
	require(DIR_FS_CATALOG . 'googlecheckout/inserts/admin/modules2.php');
	// *** END GOOGLE CHECKOUT ***
	tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));

 

I did option B install on a clean test osC catalog because there are no deployment app. instructions for linux

 

google v1.5 is for osCommerce v2.2, RC 2a only, is this your version? I just spent the last two days updating to v2.2.rc2a.. and i still get the weird underline like it is suppose to be a link to somewhere. like there is a tag that isn;t closed

 

If you are upgrading from a previous version of this module, google read me says be sure to uninstall and reinstall the module in the osCommerce admin console after you deploy the source code (by clicking "uninstall" and then "install"). I removed the verison.. deleted my cookies and clear the cache. and then install the module. This ensures that the database tables are adjusted appropriately. So there must be changes to the db tables, configuration where would I find these changes..

 

 

my v1.5 db tables are:

 

google_checkout google_checkout

googlecheck_out_logs B

google_configuration

google_orders

google_configuration

google_orders

 

Are you getting an install button in admin > modules > payment > for the google checkout module? see this picture --this is what I see before install. any Ideasnormal_Screenshot-8.png


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites

I just spent the last two days updating to v2.2.rc2a.

That pink BG looks like an error css.style? Any error messages? Is this before you try to install or after? If there is an open tag I would check admin/modules.php near google inserts and any require/includes on that page, and admin/configure.php.

 

v 1.5 works best with PHP5 with cURL (libcurl) installed and enabled..

 

Google says: earlier PHP 4.3.0 with libcurl v7.9.0 or newer, and libxml-2.4.14 or newer for xml is ok, but I expect it could be problematic?

 

not sure about mySQL db changes, I never installed v1.45, but v1.5 does not use googlecheck_out_logs B table? Configurations changes should be updated when you install. There are some db config alterations in code at: catalog/includes/modules/payment/googlecheckout.php near line #263, #280...

 

also I noticed some changes in variable names when I compared 1.5 to 1.45.

 

Did you install a clean osC v2.2, RC 2a and v1.5 for testing? This would probably be a good idea? You should be able to install a test version on the same domain if you can use additional db's. You should also create new merchant and user Google checkout accounts for testing.

Share this post


Link to post
Share on other sites
I just spent the last two days updating to v2.2.rc2a.

That pink BG looks like an error css.style? Any error messages? Is this before you try to install or after? If there is an open tag I would check admin/modules.php near google inserts and any require/includes on that page, and admin/configure.php.

I have the backgournd that color because I like it and the gray bluish color is so boring..

 

v 1.5 works best with PHP5 with cURL (libcurl) installed and enabled..I have all that.. double checked.

 

Google says: earlier PHP 4.3.0 with libcurl v7.9.0 or newer, and libxml-2.4.14 or newer for xml is ok, but I expect it could be problematic?

 

not sure about mySQL db changes, I never installed v1.45, but v1.5 does not use googlecheck_out_logs B table? Configurations changes should be updated when you install. There are some db config alterations in code at: catalog/includes/modules/payment/googlecheckout.php near line #263, #280... should I remove the older database file for the google.. so it can use the new ones? I don't think that would be the problem.

 

also I noticed some changes in variable names when I compared 1.5 to 1.45. So I guess the answer wouold be yes. remove the database files.

 

Did you install a clean osC v2.2, RC 2a and v1.5 for testing? This would probably be a good idea? You should be able to install a test version on the same domain if you can use additional db's. You should also create new merchant and user Google checkout accounts for testing. Yes I did and you where right.. it looked correct.. I didn't do the testing but from everything I read I am sure it will work.. so. back to the drawing board so to speak. I am going to start adding the mods that I am using into the new cart and see what happens.. boy from everything I read googlecheck is a real plus-- thank you for your help.

I will let you know my progress if you want to know.

noppie


Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites
I have the backgournd that color because I like it and the gray bluish color is so boring.
OK

It shouldn't hurt anything to just leave that googlecheck_out_logs B table, all v1.5 logs are not stored in db they're written in google response_message.log, and response_error.log text files. Later after doing a db BU you could remove?

 

Yes, let me know of your progress and any problems... and when you get to your api callback and responsehandler... hope you can help me a little? Got it mostly working but still have a few bugs I'm working through ...?

Edited by h2oHOH

Share this post


Link to post
Share on other sites

Ok I now got it working sort of.. I am having the same problem with this mod and I did with the last one..

 

the shipping.. for example I want the first shipping to be 2.00 and anything added will go up .50 untill 5.00 is reach..

and I set up the table

and when I go to use the sand box only a dollar shows up.. what am I doing wrong.

now I used table or zone based rates same result.

 

Zone Based Rates

 

Enable Zones Method

True

 

Tax Class

--none--

 

Sort Order

0

 

Zone 1 Countries

US,CA

 

Zone 1 Shipping Table

1:2.50,3:2.3.00,4:3.50,5:5.00

 

this is what i got from the shipping generator.

please

 

<?php
/**
 * File: googlecheckout/library/shipping/merchant_calculated_methods.php file
 */ 
$mc_shipping_methods = array(
					'zones' => array(
								'domestic_types' =>
								  array(
									  'zones' => 'Shipping to US : 0 lb(s)',

									   ),

								'international_types' =>
								  array(

									   ),
									),
							  );

$mc_shipping_methods_names = array(
									 'zones' => 'Zone Rates',
									);
?>

 

noppie

Edited by noppie

Peace is possible.. Please don't give up.

 

"War is --the old betraying the young"

Share this post


Link to post
Share on other sites
having the same problem with this mod and I did with the last one..

Your

Zone 1 Shipping Table 1:2.50,3:2.3.00,4:3.50,5:5.00

I think the way you have this constructed now is 1:2.50 = 1 dollar or 1 item and shipping charge of $2.50, .... looks like an error in the next - 3:2.3.00 ... etc

 

So for what you want it would be 1:2.00,2:2.50,3:3.00,4:3.50,5:4.00... etc. i think, ?

 

however, I think zone rates are based by default on weight, so if you gave each product a weight of 1 lb. it should work? You could also customize zone.php and english.php to represent price instead of weight...

 

$1 dollar is showing up because that's a google checkout default value when it's not setup right.

 

Your generated shipping methods don't look right? hope this helps for now, busy wkend...will look into further soon....

Edited by h2oHOH

Share this post


Link to post
Share on other sites

I am getting this error when i tried to access my url /googlecheckout/responsehandler.php.

 

Parse error: syntax error, unexpected T_DEFAULT in ... /googlecheckout/responsehandler.php on line 1154

 

I will really appreciate any help.

Share this post


Link to post
Share on other sites
syntax error, unexpected T_DEFAULT in ...

T_CASE errors are usually referring to a missing "}" , or single/double quote, missing ";" or ":", or maybe the preceding case statement is not ended properly with a break statement. The cause is always somewhere above your error message line number. What's on line 1154?

Share this post


Link to post
Share on other sites

Thank you very much for the reply. Line number 1154 has default; ... Here is the piece of code.

 

case 'DELIVERED': {

$check_status = tep_db_fetch_array(tep_db_query("select orders_status from " . TABLE_ORDERS . "

where orders_id = '" . $google_order['orders_id'] . "'"));

 

switch ($check_status['orders_status']){

case GC_STATE_REFUNDED: {

$orders_status_id = GC_STATE_SHIPPED_REFUNDED;

break;

}

case GC_STATE_PROCESSING: {

default; // Line number 1154

$orders_status_id = GC_STATE_SHIPPED;

break;

 

}

}

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

×