[Google Checkout] Another Option for the Checkout Module

nealf

Joined: 2006-12-05
Posts: 5
Posted: Tue, 2006-12-12 21:20

Ok, so this is my first post, and it comes with a module. Pretty scary, I know. After hearing that Google was extending their fee free period (meaning only 2% charged per transaction, no $0.20 fee), I decided it would definitely be nice if this option was out there. I didn't see anybody else on the forums that seemed to be working on it, so I threw this together by copying and modifying the PayPal module.

This download comes with some caveats. Basically, I'm a real programming novice, so I might have messed something up (I don't think I did, but I might have). Reading the Google Checkout API and other documents are a must. I highly recommend setting up a test buyer and a test seller account in the sandbox area and playing with Google's fake credit cards first. Remember you will have to change your Merchant ID when switching between the sandbox and live modes.

Also, when I get the time, I will add this to the 3rd party module codex list and create a codex page.

To install, download the zip file and unzip it to the modules directory. Install it like you would the other commerce modules and use your Google Merchant ID to configure it. **VERY IMPORTANT** In the Google Checkout -> Settings tab in your Google Checkout account (not in Gallery), go to the Integration Page listed on the left. On the right side under Shopping Cart Type, you must enable the checkbox labeled "Allow shopping carts with name/value pairs to be sent to Google." Otherwise you will be given a file to download instead of being taken to Google Checkout.

Please let me know of any problems you have or anything you would like to see changed.

Without further ado...

*UPDATED 12-13-2006*
-Added the ability to change between sandbox and live version

*UPDATED 01-17-2007*
-Changed the url for Google's sandbox because Google changed it as of 01-17-2007

neal

AttachmentSize
checkoutgoogle.zip6.71 KB
 
nealf

Joined: 2006-12-05
Posts: 5
Posted: Tue, 2006-12-12 23:04

Just for some more info about the module:

This is the basic module that uses the HTML API that Google specifies. Using just a form and POST method, this sends Google the info in the shopping cart. There is nothing that gets received back from Google. So for example, there is no way to tell if the purchase has been completed and if the cart should therefore be emptied, so at this point it isn't.

There is "Level 2" integration with Google Checkout which allows for processing information to be posted back to your server, but this would have required quite a bit more time on my part, and since there isn't an administrative view for turnbulm's cart, yet the usefulness would be relatively little (beyond emptying the cart). At some point I would like to transition to this system, but we'll see.

For my installation, I had Gallery 2.1.2 installed along with Checkout v0.1.14. This was a single-site installation and I have no idea if it works for multi-site or even if there is any reason why it wouldn't!

neal

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-12-14 14:59

Thanks!

I think it's a good start and we'll see how much interest there is in this payment / checkout option. Later we can switch to use signed carts (not the HTML API) and have an administration screen as well callback URLs (additional G2 controllers can do the handling).

 
jonkun227

Joined: 2005-10-07
Posts: 31
Posted: Sat, 2007-01-13 14:29

I am very much interested in a robust version of this module. I don't trust PayPal (I've had my share of bad experiences with them), and would like to try Google for my merchant services until I can afford my own authorize.net account.

For now, great work!

- Jon

 
scherermaddness

Joined: 2006-09-13
Posts: 15
Posted: Mon, 2007-01-22 19:37

I like the concept of this!
Would you recommend that I attempt to install this module at this time or is it still considered fairly unstable?

Thank you,

David

www.davidmscherer.com

 
nealf

Joined: 2006-12-05
Posts: 5
Posted: Tue, 2007-01-23 14:21

David,
The version I've been using has been working for me without any problems. I haven't gotten any other feedback, but as far as I know it is stable. Give it a shot if you want, and let me know if you have any problems! Thanks!

neal

 
londoncowgirl

Joined: 2007-02-06
Posts: 1
Posted: Wed, 2007-02-07 18:30

Neal

Thanks for putting this together. It's great to have an alternative to Paypal.

Do you have future development plans for this module?

If so, what features will you include?

I personally would like a feature that redirects customers back to my site where they can download the images. Or send the images to them in an email after purchase.

Any plans for this?

Carla

 
jdingman

Joined: 2003-11-28
Posts: 43
Posted: Tue, 2007-02-20 00:01

Are there any success or failures store for this module?

 
astartz

Joined: 2007-03-25
Posts: 1
Posted: Mon, 2007-03-26 06:03

I install and configured it no problem but when someone clickos on Checkout they get this:
Error (ERROR_UNIMPLEMENTED)

* in modules/checkout/classes/CheckoutPluginInterface_1_0.class at line 48 (gallerycoreapi::error)
* in modules/checkout/ConfirmPhotos.inc at line 121 (checkoutgoogleplugin::getpaymenttexttemplate)
* in modules/core/classes/GalleryView.class at line 300 (confirmphotosview::loadtemplate)
* in main.php at line 441 (confirmphotosview::doloadtemplate)
* in main.php at line 94
* in main.php at line 83

System Information
Gallery version 2.2
PHP version 4.4.4 cgi
Webserver Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Database mysqlt 5.0.24a-standard-log
Toolkits Thumbnail, SquareThumb, NetPBM, Gd
Operating system Linux amp 2.6.18.1-grsec+e+f6b+gr219+opt+c4a+gr2b-grsec #1 SMP Thu Oct 19 12:50:29 PDT 2006 i686
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

I am using Checkout 0.1.15
Does anyone have any ideas?

 
tmas73

Joined: 2006-09-01
Posts: 28
Posted: Fri, 2007-04-06 16:00

Getting a error too.

<error serial-number="3572bafc-152a-4e22-a0b2-98b44debbb08">
<error-message>No seller found with id 35212024710----</error-message>
</error>

Thanks

Gallery version = 2.1.2 core 1.2.0.1
PHP version = 4.4.4 cgi-fcgi
Webserver = Apache
Database = mysql 5.0.22, lock.system=flock
Toolkits = ArchiveUpload, Exif, Ffmpeg, ImageMagick, NetPBM, Gd
Acceleration = none, none
Operating system = FreeBSD web01.secureserverdot.com 6.1-STABLE FreeBSD 6.1-STABLE #1: Mon Jul 3 00:30:26 EDT 2006

:/usr/obj/usr/src/sys/SH i386
Default theme = carbon
gettext = enabled
Locale = en_GB

 
silverfox

Joined: 2004-10-08
Posts: 21
Posted: Mon, 2007-05-28 05:16

tmas, that is because google doesn't have a merchant ID that you're using. Its important to remember that the "sandbox" area does not use the same merchant ID's as the live area.

To sign up for a sandbox merchant ID, go here:

https://sandbox.google.com/checkout/sell/

Remember that when you change your checkout module from sandbox to live, you'll need to change the merchant ID to the live merchant ID (again, google considers the sandbox area a separate account, so it'll have a different merchant ID)

Quote:
**VERY IMPORTANT** In the Google Checkout -> Settings tab in your Google Checkout account (not in Gallery), go to the Integration Page listed on the left. On the right side under Shopping Cart Type, you must enable the checkbox labeled "Allow shopping carts with name/value pairs to be sent to Google." Otherwise you will be given a file to download instead of being taken to Google Checkout.

Nealf, maybe the settings have changed since you made this post. Now the options are:

* New order notifications
* Shopping cart post security
* API callback URL (Level 2 integrations only)

The one you are referring to here is the "Shopping cart post security", which needs to be unchecked for this module to work (HTML API).

 
daveozzz
daveozzz's picture

Joined: 2006-07-25
Posts: 70
Posted: Mon, 2007-05-28 12:55

Just a note for UK users.

the cart defaults to USD so if you want it to work in GBP you can add the following to the post form in Paymentbutton.tpl:

<input type="hidden" name="item_currency_1" value="GBP"/>
and
<input type="hidden" name="ship_method_currency_1" value="GBP"/>

 
izzysanime

Joined: 2006-01-18
Posts: 6
Posted: Sun, 2007-06-10 01:53

OK, i got it setup and working, but I do not see a add to cart or anything like that If I'm not logged in as admin. If I am logged in as admin, i see the added to cart option, so i know it is there.

thanks
Josh

 
silverfox

Joined: 2004-10-08
Posts: 21
Posted: Sun, 2007-06-10 05:33
Quote:
OK, i got it setup and working, but I do not see a add to cart or anything like that If I'm not logged in as admin. If I am logged in as admin, i see the added to cart option, so i know it is there.

You need to edit the permissions of the album and add the '[checkout] Purchase item' permission to 'Everybody' group.

 
izzysanime

Joined: 2006-01-18
Posts: 6
Posted: Sun, 2007-06-10 17:24

ok, thanks it works now

 
brujji

Joined: 2007-02-11
Posts: 47
Posted: Sun, 2007-07-01 08:11

Hey guys,
first of all thank you so much for developing this module, google is much cheaper than paypal and if you ask me, more trustworthy!. The only problem I am having is that when I click on the google checkout button, google tells me that I have sent a cart with errors in it, does this make sense to anyone? I'm not sure what these errors can be, as I haven't altered anything... I am only using level 1 integration, (I'm not too sure how to do the level 2 integration... do you know what the url would be?).
I am using Gallery 2.2.2 and the website is [http://www.aliciaphotographics.com/findyourwedding/main.php]

If anyone could help it would be great

Thanks again

Ana

 
brujji

Joined: 2007-02-11
Posts: 47
Posted: Sun, 2007-07-01 08:33

Oops found the problem, well there were two:
1- I hadn't set the account to send unsigned forms to google (on the integration settings of google's page). I unticked this box and it was fine.

2- I hadn't changed the code on the paymentbutton.tpl so that it uses GBP insted of USD.

It is now working fine!
Woohoo!

Thanks so much again for developing this module, it makes my life a hell of a lot easier

Ana

 
d1verse

Joined: 2006-08-03
Posts: 6
Posted: Fri, 2007-07-27 13:23
Quote:
Thanks so much again for developing this module, it makes my life a hell of a lot easier

I DEFINITELY second that! Good job!

 
capturedbyagela

Joined: 2007-07-20
Posts: 9
Posted: Wed, 2007-08-08 13:56

When I click the google check out it takes me to a page cannot be displayed error...How do I fix this?

Gallery version = 2.2.2 core 1.2.0.4
PHP version = 4.3.11 cgi-fcgi
Webserver = Apache
Database = mysqlt 4.1.22-max-log, lock.system=flock
Toolkits = ArchiveUpload, Thumbnail, Gd, ImageMagick
Acceleration = none, none
Operating system = Linux p3slh031.shr.phx3.secureserver.net 2.4.21-47.0.1.ELsmp #1 SMP Fri Oct 13 17:56:20 EDT 2006 i686
Default theme = classic
gettext = enabled
Locale = en_US
Browser = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF; SV1; .NET CLR 1.1.4322)
Rows in GalleryAccessMap table = 19
Rows in GalleryAccessSubscriberMap table = 11
Rows in GalleryUser table = 2
Rows in GalleryItem table = 8
Rows in GalleryAlbumItem table = 3
Rows in GalleryCacheMap table = 0

 
ducky98

Joined: 2008-03-04
Posts: 1
Posted: Tue, 2008-03-04 19:36

ok I got the module installed and configured ..However, when I try to send the order to google I'm getting webpage cannot be found.

any ideas?

my site is: http://www.wazzagoo.com/gallery
https://sandbox.google.com/checkout/cws/v2/Merchant/624435187922331/checkoutForm

 
knott

Joined: 2007-06-11
Posts: 36
Posted: Thu, 2008-03-20 17:10

Stunning, I don't know how I'd not come accross this sooner. I did search a few months ago but bust have missed it.
Any way it can be promoted a bit better within gallery?

Quick question, I have 3 methods installed - email, paypal & google... How do I change the order they are listed in?
I'd really like google at the top and paypal at the bottom.

Many thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Fri, 2008-03-21 14:27
Quote:
Any way it can be promoted a bit better within gallery?

Checkout is being updated at the moment - see http://gallery.menalto.com/node/74849 and the google module is being worked on. It should be possible to include it along with the email and paypal options in the future.

 
knott

Joined: 2007-06-11
Posts: 36
Posted: Thu, 2008-07-10 11:34

Hi Alec, Any news on this?

I've updated my gallery & checkout to the latest version.

many thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Thu, 2008-07-10 13:13

Only bad news, I'm afraid.

Google Checkout requires https:// access for it's payment notification callbacks, so for most users that would mean having to pay for a certificate and a unique IP address, which makes it quite an unattractive proposition. So I've no plans at the moment. Someone else might be interested in writing it, and I'll provide technical help if they do.

 
CHOCKYMONSTER

Joined: 2008-09-18
Posts: 4
Posted: Tue, 2008-09-23 17:58

Alec,

is this why I get this at the point of trying to checkout?

We contacted Google at this url:
https://sandbox.google.com/checkout/api/checkout/v2/merchantCheckout/Merchant/<my sandbox merchant id>

The Google Website returned the following response:

<?xml version="1.0" encoding="UTF-8"?>
<error xmlns="http://checkout.google.com/schema/2" serial-number="6beec098-9797-4bf1-9436-88b417836912">
<error-message>An HTTPS connection is required to connect to the API. You tried to connect using HTTP.</error-message>
</error>

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-09-23 22:46

Hi CHOCKYMONSTER (may I call you Chockymonster?)

Quote:
is this why I get this at the point of trying to checkout?

Possibly not. For sure you need an https connection back to your gallery - for more details see this page:
http://codex.gallery2.org/Gallery_2:Modules:checkoutgoogle
but that's to get Google order-placed and payment-received notifications.

Before you reach that stage you also need Gallery to be able to make outgoing https connections, the lack of which is what triggered that message I think. Unfortunately G2.2.x doesn't have the right code to be able to do this. G2.3 does, but it's not been released yet. The solution is to replace modules/core/classes/helpers/WebHelper_simple.class with its namesake from the 2.3RC1 release, although you're on your own as to whether this causes any other difficulties (it hasn't on my installations).

There may also be restrictions in your php installation as to whether this will work even then - please let me know how it goes.

 
knott

Joined: 2007-06-11
Posts: 36
Posted: Mon, 2008-10-20 10:36

Hi,

I've had to reinstall g2 from scratch and so have ended up with 2.2.6 (just seen 2.3 is now released, so will have to look at that soon.)

The problem is I have lost all my google checkout.

I've downloaded & installed the file from the top but it doesn't seem to want to work with the checkout module 0.3.3
(I can't use googlecheckout 0.4 because I don't have a ssl cert)

What version of checkout do I need to get, to get this old version of google checkout to work. Will this work with 2.2.6 or even 2.3 if I upgrade?.... or is there a better solution?

Many thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2008-10-20 11:02

checkoutgoogle only works

  • with checkout 0.4.0 or later (recommend you use the latest version, currently 0.4.1) and
  • only with gallery 2.3 (unless you hack some core files) and
  • you need an SSL certificate - sorry.
 
knott

Joined: 2007-06-11
Posts: 36
Posted: Mon, 2008-10-20 11:46

Sure I understand all that, but the old version of googlecheckout (above) didn't.. any ideas on what I need to down grade to to get it to work?

Looked up certs and the costs seem a little much for a fun running club project of selling a photo every now & then for a few pounds. Any advice on a reasonable supplier?

many thanks
Graeme

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Mon, 2008-10-20 12:07

checkoutgoogle needs to be able to contact Google via HTTPS, which is a facility included only in Gallery 2.3 - so I can guarantee no version of checkoutgoogle will work with an unmodified 2.2.x installation.

Google needs to be able to contact Gallery via HTTPS, which requires a certificate of some kind. It can be shared (i.e. provided by your hosting provider free, and shared between the different sites on that IP address) or individual to your site - for which you'll need a unique IP address. The cost of an individual cert is usually around $200 per year. I haven't investigated whether google will accept self-signed certificates, but I suspect not, as that would rather spoil the point. Again, this is not a change in any version of checkoutgoogle - this is a requirement of Google Inc.

Previous ('beta') versions of checkoutgoogle may have installed on older versions of checkout, but that doesn't mean they would have worked correctly, or at all.

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-10-21 16:23

I thought some people might be interested to know that Google accepts SSL/TLS certificates from GoDaddy that are currently on sale for $14.99 per year. You still need a unique ip address for your server, but at least you don't have to spend hundreds of dollars on a certificate now.

http://www.godaddy.com/gdshop/compare/gdcompare_ssl.asp

 
knott

Joined: 2007-06-11
Posts: 36
Posted: Tue, 2008-10-21 17:33

Hi Alec, thanks for the info on the cheap cert I'll go & have a look.

Managed to find some old versions on my backups checkout 0.1.4 & it works fine with Nealf's original googlecheckout code (via the html api) so no need for cert.

thanks

 
alecmyers

Joined: 2006-08-01
Posts: 4342
Posted: Tue, 2008-10-21 19:13
Quote:
Managed to find some old versions on my backups checkout 0.1.4

LOL! ancient history, my friend! (look out for the curse of the Mummy, and try not to disturb any precious relics when you root around back there...)