Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

GOOGLE CHECKOUT IPN


ski2bbad

Recommended Posts

Just installed this and it works fine - ie the order goes through and is seen on Google Account.

But it doesn't update the status of the order on my shop like the Paypal IPN does, it is surpose to? If it is what am i doing wrong? Or do i have to update that manually?

I do have a SSL Cert but it is only a shared one (https://sslrelay.com/myshop.co.uk/catalog/google_ipn.php) could that be the problem?

 

Hi spiceworld,

 

Please check post #170 for a link to the accepted certs as I cannot answer that question for you. I did try to access your URL link mentioned above, but all I get is the following message error

The SSL proxy service is not availabe for the requested domain.

If you are the domain owner, you can enable it through your control panel.

 

I would check with your hosting company as they may be able to help you further.

 

Regards,

 

ski

Link to comment
Share on other sites

  • Replies 236
  • Created
  • Last Reply

Top Posters In This Topic

it says it needs https but the site i have it on doent have a security certificate, can i still use this contribution?

slee, you need to get yourself a cert in order to use this contrib. Please check a few posts back as this has already been discussed.

 

regards,

 

ski

Link to comment
Share on other sites

Thanks for the fast reply. Here's our checkout_process snippet:

 

Hi moonlitsun.

 

I don't know exactly what you need me to do here. . . .

 

In any event, if you have modified your checkout_process.php file you need to MERGE the file with the GC checkout process file as I mentioned on a previous post. I cannot do that for you. Please be more specific with your post so that people in this forum may be able to help you.

 

regards,

 

ski

Link to comment
Share on other sites

Hi,

I've tried to search the forum but with no results so far.

If this has been already asked so many times, pls forgive me.

I followed the instructions given by ski to mangotree about the VAT in UK. It works fine but, ..since I have all the prices VAT included I got this problem.

Before I go to the checkout the order total is showing fine:

item= VAT included

shipping=VAt included

On google (sandbox) everything is fine except the shipping where VAT is added to the already VAT included price.

Of course if I put the shipping as not taxable I would resolve the probelm, but it wouldn't be nice ;-)

Anyone could help?

Thanks,

Roberto

Link to comment
Share on other sites

Hello all.

 

Regarding my previous post above . . . . I have solved the problem :thumbsup:

 

I decided to print out the google.php file so that I could take a closer look at it, other than just looking at the computer screen, and that did it!

 

Ok, for those of you needing to figure out taxes (including or excluding shipping taxes) or simply trying to get GC to show the TAX correctly here is how you can fix the tax problem:

 

on catalog/includes/modules/payment/google.php:

 

FIND:
		  $tax = number_format($value['tax'] / 100, 2, '.', '');

CHANGE TO:
		  $tax = number_format($value['tax'] / 100, 4, '.', '');

 

If shipping charges are taxable where you reside you also need to change (same file catalog/includes/modules/payment/google.php)

 

FIND:
							  $data .= '				<shipping-taxed>false</shipping-taxed>' . $eol;
CHANGE TO:
							  $data .= '				<shipping-taxed>true</shipping-taxed>' . $eol;

FIND:
							  $data .= '				<rate>' . $default_tax_rate . '</rate>' . $eol;
CHANGE TO:
							  $data .= '				<rate>' . $tax . '</rate>' . $eol;

 

The first modification will increase the tax rate pad (i.e. X.XX to X.XXXX) so that there is no rounding; Google uses the X.XXXX format. The second modification will make shipping taxable and charge the appropriate tax that you have setup for your store.

 

It's amazing what you can see when you look at an actual piece of paper :rolleyes:

 

Regards,

 

ski

 

Hi Ski,

I have already posted the same question at the end of the pages, but I don't know if it went through.

Here I add an example with numbers, hoping it would be clearer.

I should have your same output (tax and shipping) but I don't :-( and I can't get it to work.

First, on my order confirmation page I have this:

 

Sub-Total Excl.VAT: £17.01 ... I added a contribution to show a subtotal excluding taxes

(UK mainland): £5.99 ....it should be £5.10(excl.VAT) but it comes up already with VAT incl.

TAX 17.5%: £3.87 .... this is VAT on the item and on the shipping

Total: £25.98 .... total is fine

 

WhenI click CONFIRM ORDER and I go to google checkout I have this:

 

Price £19.99 ... price including VAT

Shipping: £7.04 ... £5.99 (was the shipping cost with VAT alredy included) and here google add another VAT again??

Total: £27.03 ... total must be £25.98

(includes VAT £4.03)

 

I hope it is all clear and I believe that it can be solved showing the shipping cost excl VAT on my order... but how?

Thanks in advance to anyone who will helm me on this ;-)

Roberto

Link to comment
Share on other sites

Hi Ski,

I have already posted the same question at the end of the pages, but I don't know if it went through.

Here I add an example with numbers, hoping it would be clearer.

I should have your same output (tax and shipping) but I don't :-( and I can't get it to work.

 

Hi Monteverde.

 

I don't know if I will be able to help you, but I can at least try. Google make things a bit more complicated in the UK and it is hard for me to test things as I am in the US. Please post your google.php file here (only if you have made modification) and I will take a look. I'm a bit busy with other things, but I will do my best to get an asnwer to you ASAP.

 

Cheers.

 

ski

Link to comment
Share on other sites

Hi Monteverde.

 

I don't know if I will be able to help you, but I can at least try. Google make things a bit more complicated in the UK and it is hard for me to test things as I am in the US. Please post your google.php file here (only if you have made modification) and I will take a look. I'm a bit busy with other things, but I will do my best to get an asnwer to you ASAP.

 

Cheers.

 

ski

 

Hi Ski,

thanks for finding the time and give us all your support.

I haven't made any modifications to the google.php, apart from the one that you suggested above.

I don't know why it takes from the shopping cart the item price with tax excluded and the shipping with tax included.

Anyway if in the future you will find a solution let me know.

Temporarely I have put the shipping tax (false) so it won't be taxed again in google.

Thanks,

Roberto

Link to comment
Share on other sites

Can anyone help me out with getting this module working with the Discount Coupon module. When attempting to apply a coupon I receive the following...

 

Here is thee rror message I am getting when applying this 'fix' for Google Checkout:

Error: 	 Error parsing XML; message from parser is: Invalid value for body of unit-price in checkout-shopping-cart/shopping-cart/items/item: This is not a number
Warnings: 	XML failed to validate against the schema at line: 15, column: 15, with error: cvc-datatype-valid.1.2.1: '--17.99' is not a valid value for 'decimal'.
XML failed to validate against the schema at line: 15, column: 15, with error: cvc-complex-type.2.2: Element 'unit-price' must have no element [children], and the value must be valid.

 

And here is the part of the 'XML received' by Google that appears to contain the problem:

<item>
	<item-name>Discount Coupon 3FOR2 applied</item-name>
	<item-description>Discount Coupon 3FOR2 applied</item-description>
	<unit-price currency="GBP">--17.99</unit-price>
	<quantity>1</quantity>
</item>

 

 

It looks like a simple syntax problem producing the price as --17.99 instead of 17.99.

 

Can somebody suggest a fix?

 

 

I have also posted this here.

Link to comment
Share on other sites

I've now installed both this and the regular contrib, so the customer can hit Google Checkout from the basket and go through Google's "official" route or when he's gone through the checkout process he gets another chance to select Google using the IPN.

 

Has anyone actually had their account banned / restricted etc by using this contrib? There seems to be lots of warnings on other forum threads, and some harsh warnings on Googles own site, and I've read the text file that comes with the contrib (but it's undated so doesn't make current policy clear?).

 

So... anyone had an email from Google where they've got a bit funny about this recently? Particularly from .co.uk Google team?

Link to comment
Share on other sites

Okay to clear this up this much debated issue! I am UK and this is from the email I received following first transaction through this IPN:

 

"During our recent review, we found that you have processed at least one

transaction through Google Checkout. However, we were unable to locate

Google Checkout buttons on your website.

 

As outlined in our programme policies at

https://checkout.google.com/seller/policies.html, you must ensure Google

Checkout buttons or Buy Now buttons are available on your website before

any registration or sign-in pages.

 

Because it appears that your website does not meet this policy

requirement, your AdWords ads are not eligible to display Google Checkout

badges at this time. (Your account is still active, however and you may

continue to process transactions.)

 

If you would like to display Google Checkout badges again, you may update

your website in order to meet this requirement. After you update your

site, please reply to this message so we can confirm the changes."

 

 

So I can use to process payments but cannot display a badge on my adwords. Hope this helps.

Link to comment
Share on other sites

Hello.

 

This is a re-release of an old Google Checkout module that will enable your orders to be processed through the regular checkout process (allowing you to use whichever modules you already have in place; i.e. Gift Cert, coupons, FedEx, UPS, free shipping flags etc.) before the order is passed on to Google, similar to the way it is done with PayPal.

 

The module can be found here.

 

Good luck!

 

ski

 

Thank you for your posting this google checkout module. Can anyone know how to download it? I did not find the download link.

Link to comment
Share on other sites

Hi ski,

 

I was testing the code for the countries issues that was previously reported. I did few mods to the catalog\includes\modules\payment\google.php function gen_shopping_cart.

 

The mods allow a store to use the module regardless of country. So the same code should work for UK, US etc. Cannot recall when I got the file so is best if you could review it first. (there coulld be other updates in-between)

 

Here is the entire gen_shopping_cart function

  function gen_shopping_cart($orders_id) {
global $order, $order_total_modules;

//-MS- International Support Added
if( isset($order->delivery['country_id']) ) {
  $country_info = tep_get_countries($order->delivery['country_id'],true);
} else {
  $country_info = array('countries_iso_code_2' => 'US');
}
//-MS- International Support Added EOM

$default_tax_rate = number_format($order->info['tax'] / $order->info['subtotal'], 2, '.', '');
$eol = "\n";
	$alternate_tax = '';
$data = '<?xml version="1.0" encoding="UTF-8"?>' . $eol;
	$data .= '  <checkout-shopping-cart xmlns="http://checkout.google.com/schema/2">' . $eol;
$data .= '	  <shopping-cart>' . $eol;
$data .= '		  <items>' . $eol;
reset($order->products);
foreach ($order->products as $key => $value) {
	$tax = number_format($value['tax'] / 100, 2, '.', '');
	$data .= '			  <item>' . $eol;
	$data .= '				  <item-name>' . htmlentities($value['name']) . '</item-name>' . $eol;
	$data .= '				  <item-description>' . htmlentities($value['name']) . '</item-description>' . $eol;
	$data .= '				  <unit-price currency="' . $order->info['currency'] . '">' . $value['final_price'] . '</unit-price>' . $eol;
	$data .= '				  <quantity>' . $value['qty'] . '</quantity>' . $eol;
	$data .= '				  <tax-table-selector>tax-' . $value['id'] . '</tax-table-selector>' . $eol;
	$data .= '			  </item>' . $eol;
	$alternate_tax .= '	 <alternate-tax-table name="tax-' . $value['id'] . '" standalone="false">' . $eol;
	$alternate_tax .= '	   <alternate-tax-rules>' . $eol;
	$alternate_tax .= '		 <alternate-tax-rule>' . $eol;
	$alternate_tax .= '		   <rate>' . $tax . '</rate>' . $eol;
	$alternate_tax .= '		   <tax-area>' . $eol;
	$alternate_tax .= '			 <postal-area>' . $eol;
	$alternate_tax .= '			   <country-code>' . $country_info['countries_iso_code_2'] . '</country-code>' . $eol;
	$alternate_tax .= '			  </postal-area>' . $eol;
//		$alternate_tax .= '		   <us-country-area country-area="FULL_50_STATES"/>' . $eol;
	$alternate_tax .= '		   </tax-area>' . $eol;
	$alternate_tax .= '		 </alternate-tax-rule>' . $eol;
	$alternate_tax .= '	   </alternate-tax-rules>' . $eol;
	$alternate_tax .= '	 </alternate-tax-table>' . $eol;	 
}
if (MODULE_ORDER_TOTAL_INSTALLED && is_array($order_total_modules->modules)) {
	reset($order_total_modules->modules);
	while (list(, $value) = each($order_total_modules->modules)) {
	$class = substr($value, 0, strrpos($value, '.'));
	if ($GLOBALS[$class]->enabled) {
		$size = sizeof($GLOBALS[$class]->output);
	  for ($i=0; $i<$size; $i++) {
		if ($value == 'ot_coupon.php' || $value == 'ot_gv.php') {
			$discount_title = htmlentities(substr($GLOBALS[$class]->output[$i]['title'], 0, strlen($GLOBALS[$class]->output[$i]['title']) - 1));
			$discoun_value = number_format($GLOBALS[$class]->output[$i]['value'], 2, '.', '');
		  $data .= '				<item>' . $eol;
					$data .= '				  <item-name>' . $discount_title . '</item-name>' . $eol;
					$data .= '				  <item-description>' . $discount_title . '</item-description>' . $eol;
						$data .= '				  <unit-price currency="' . $order->info['currency'] . '">-' . $discoun_value . '</unit-price>' . $eol;
					$data .= '				  <quantity>1</quantity>' . $eol;
					$data .= '			  </item>' . $eol;
				}
	  }
	}
  }	 
}
$data .= '		  </items>' . $eol;
$data .= '		  <merchant-private-data>' . $eol;
$data .= '		  <osc-orders-id>' . $orders_id . '</osc-orders-id>' . $eol;
$data .= '		  </merchant-private-data>' . $eol;
$data .= '	  </shopping-cart>' . $eol;
$data .= '	  <checkout-flow-support>' . $eol;
$data .= '		<merchant-checkout-flow-support>' . $eol;
$data .= '		  <continue-shopping-url>' . htmlentities(tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'order_id=' . $orders_id)) . '</continue-shopping-url>' . $eol;
$data .= '			<tax-tables>' . $eol;
$data .= '			  <default-tax-table>' . $eol;
$data .= '				<tax-rules>' . $eol;
$data .= '				  <default-tax-rule>' . $eol;
$data .= '					<shipping-taxed>false</shipping-taxed>' . $eol;
$data .= '					<rate>' . $default_tax_rate . '</rate>' . $eol;
$data .= '					<tax-area>' . $eol;
$data .= '					  <postal-area>' . $eol;
$data .= '						<country-code>' . $country_info['countries_iso_code_2'] . '</country-code>' . $eol;
$data .= '					  </postal-area>' . $eol;
//$data .= '								  <us-country-area country-area="FULL_50_STATES"/>' . $eol;
$data .= '					</tax-area>' . $eol;
$data .= '				  </default-tax-rule>' . $eol;
$data .= '				</tax-rules>' . $eol;
$data .= '			  </default-tax-table>' . $eol;
$data .= '			  <alternate-tax-tables>' . $eol;
$data .= $alternate_tax;
$data .= '			  </alternate-tax-tables>' . $eol;
$data .= '			</tax-tables>' . $eol;
if (tep_not_null($order->info['shipping_method'])) {
	$data .= '		<shipping-methods>' . $eol;
	$data .= '		  <flat-rate-shipping name="' . htmlentities($order->info['shipping_method']) . '">' . $eol;
	$data .= '			<price currency="' . $order->info['currency'] . '">' . number_format($order->info['shipping_cost'], 2, '.', '') . '</price>' . $eol;
// Worldwide Support
	$data .= '			<shipping-restrictions>' . $eol;
	$data .= '			  <allowed-areas>' . $eol;
	$data .= '				<world-area/>' . $eol;
	$data .= '			  </allowed-areas>' . $eol;
	$data .= '			</shipping-restrictions>' . $eol;
// Worldwide Support EOM
	$data .= '		  </flat-rate-shipping>' . $eol;
	$data .= '		</shipping-methods>' . $eol;
}
// UK round-up
$data .= '			<rounding-policy>' . $eol;
$data .= '			  <mode>HALF_UP</mode>' . $eol;
$data .= '			  <rule>TOTAL</rule>' . $eol;
$data .= '			</rounding-policy>' . $eol;
$data .= '		</merchant-checkout-flow-support>' . $eol;
// UK round-up EOM
//	$data .= '		</merchant-checkout-flow-support>' . $eol;

$data .= '	  </checkout-flow-support>' . $eol;
	$data .= '  </checkout-shopping-cart>' . $eol;

	return $data;
 }

The UK round-up section and worldwide sections I copied them from previous posts. The round-up section could only be applicable for certain currencies haven't tested that much.

 

So the country_info array is used instead of the hard-coded US with the default module. Since the osc has support for setting up zones for payment modules the worldwide support code should cover all cases.

Link to comment
Share on other sites

I have this contrib installed and seem to work ok, I hd to fiddle around a little to get the VAT passed thru and shipping even tho I dont charge VAT on shipping but do on my items.

 

How ever if I use a Discount Coupon Code the discount is not passed on to google.

 

IE Here is the order totals before it goes off to google

 

Sub-Total: £349.99

Shipping: £0.00

Discount Coupon Disq10 applied: -£35.00

V.A.T @ 17.5%: £46.91

Total: £314.99

 

Yet when I reach google the total amount is £349.99

 

My Test site where google is on sandbox feel free to test

 

I aslo get the same problem with Nochex APN but I wil goto their forums to try and get help there

 

The only merchant that seems to handle the discount coupon codes is Paypal IPN at the moment.

 

Isnt there a way we can just tell google here is the amount to charge for these items, rather than having it calculat shipping VAT discounts ect ect

Edited by Get-Wireless 2
Link to comment
Share on other sites

I have this contrib installed and seem to work ok, I hd to fiddle around a little to get the VAT passed thru and shipping even tho I dont charge VAT on shipping but do on my items.

 

How ever if I use a Discount Coupon Code the discount is not passed on to google.

 

I could not get this to work either. You could try kgt in the support thread again but it could also be that you are uk like me and google does not yet support coupons for the uk.

Link to comment
Share on other sites

I could not get this to work either. You could try kgt in the support thread again but it could also be that you are uk like me and google does not yet support coupons for the uk.

 

Thats correct I am in the UK did you have any trouble with Vat and shipping?

 

I chatge VAT on products but not shipping as royalmail already charge me that so I just pass the cost of RM on to the customer.

Link to comment
Share on other sites

If google checkout doesnt accept discount codes and things how does ebuyer give the customer £10 off when they spend £30 or more? or is this done before it goes to google?

Link to comment
Share on other sites

Thats correct I am in the UK did you have any trouble with Vat and shipping?

 

I chatge VAT on products but not shipping as royalmail already charge me that so I just pass the cost of RM on to the customer.

 

Well, check again... Royal Mail is VAT exempt, you are not. So you are still obliged to charge VAT on your customers.

Hard to believe but it is true.

Link to comment
Share on other sites

http://www.oscommerce.com/community/contributions,5157

some one just uploaded google api TOS (term of service) and mentioned that this contrib violate google TOS?

is this true?

 

 

Read the info included with the contribution and you will find googles own support team answer to just this question

Link to comment
Share on other sites

hi there,

 

sorry if this has been asked already (and i missed it), but ..

 

- does this contribution work successfully with CRE stores ..?

- are there any accepted pros/cons of this contrib vs others out there ..?

 

ps getting bogged down in a quagmire of GC contribs, without any clear indicators as which direction to jump ..?! :(

 

cheers ..

Link to comment
Share on other sites

I have installed this contribution, all works well accept i do not get any redirect back to the OSC Store. I noticed the instructions say that Curl is a requirement for this contribution. The site i am working on is hosted on a windows server, the error i get in google is

 

We encountered an error trying to access your server at https://www.mydomain.com/google_ipn.php -- the error we got is: Send failed with code: 401

 

Any help would be appreciated

Link to comment
Share on other sites

  • 4 weeks later...

This contrib has been working great for me. Much better than that obnoxious thing that

google prefers. If they ever strictly enforce their TOS i just simply won't offer google

checkout anymore. This ipn rocks !

 

Apart from... Discount Coupon Codes... which i just installed and is another beautiful

contrib... but it doesn't work with this thing. Anyone got a fix ?? or do i have to *gulp*

fix it myself :-(

 

Thanks,

 

Shaun

http://www.artrealization.com/shop

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