[ic] Another Google Checkout module...

Mark Lipscombe markl at gasupnow.com
Sat May 16 05:11:20 UTC 2009


In the same spirit of things that should have been done a year ago, I 
had also been working on a Google Checkout module for IC, and the 
project fell by the wayside.  I was in the process of tidying it up for 
release when Lyn posted.

I've put the module, along with a couple of supporting bits and pieces, at:


Full document

This module takes a quite different approach to Lyn's module.  In doing 
so, it probably adheres a bit more to Google's (rather strict) 
requirements about checkout flow.  The main differences:

* An order isn't generated in IC until Google actually confirms the 
order.  It does this by sending Base64 encoded items array from the 
shopping cart as private data to Google, which Google sends back, 
allowing us to recreate the shopping cart from scratch.  This saves from 
polluting the transactions table with orders that will never go ahead.

* All the settings available from Google for address and shipping method 
selection are honored.  The customer can change their shipping address 
in Google, and Google will automatically retrieve updated shipping 
options, prices and sales tax info from IC.

* An order route is never run until you actually get an order, it means 
that there is no "almost finished" orders in the database.

* You can put a button on your basket page, and the top of your checkout 
page, and your customer never has to use your own checkout pages (I 
think this is probably the main difference, Google seems to require that 
you offer their checkout in this manner).

This module uses Google's Google::Checkout Perl module, which is a bit 
of a dinosaur, as Lyn suggested.  It hasn't been updated in a while, and 
there are a couple of bugs, for which there is a patch on my site.  In 
the not too distant future, this module should be updated to either use 
XML::Simple, or someone should take on maintaining Google::Checkout.

The documentation for the module is inside the .pm file, and is probably 
quite rough around the edges.  We run a quite heavily modified IC that 
stores payments in an individual table, so I had to write a lot of the 
documentation from recollection about the layout of the standard store.

Anyway, sorry for the duplication of effort, and I hope that we can 
build a really polished Google Checkout module from the two 
contributions.  If anyone has any suggestions or problems, I'll do what 
I can to help.


More information about the interchange-users mailing list