# Google-checkout 0.1.0

**URL:** <https://www.ruby-forum.com/t/google-checkout-0-1-0/77627>\
**Category:** Ruby\
**Created:** [November 29, 2006, 8:26am UTC](https://www.ruby-forum.com/t/google-checkout-0-1-0/77627 "2006-11-29T08:26:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![1337p337](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/1/3ec8ea/32.png) [@1337p337](https://www.ruby-forum.com/u/1337p337)\
**Post date:** [November 29, 2006, 8:26am UTC](https://www.ruby-forum.com/t/google-checkout-0-1-0/77627/1 "2006-11-29T08:26:22Z")

</div>

# About

A simple library for generating the HTML and XML you need to interface  
with Google Checkout ([google.com/checkout](http://google.com/checkout)). You can get a “Checkout”  
or  
“Buy Now” button with just a few lines of code. Right now it depends  
on  
Rails’s ActiveSupport library for ‘builder/xmlmarkup’ to generate the  
XML and Daiki U.'s ruby-hmac library for signing the cart  
([http://deisui.org/~ueno/ruby/hmac.html](http://deisui.org/~ueno/ruby/hmac.html)).

# Status

Pretty stable, but missing a few small features (information in the  
README). It’s already being used in production at [vixby.com](http://vixby.com), so I’m  
pretty sure it’s stable. Bug reports and criticism are both welcome,  
though.

# License

Same as Ruby’s license. See doc/LICENSE for the details.

# Example

Here’s a brief example:  
item = {:name =\> ‘A Quarter’,  
:description =\> ‘One shiny quarter.’,  
:price =\> 0.25 }  
cart = GoogleCheckout::Cart.new(merchant\_id, merchant\_key, item)  
cart.add\_item(:name =\> “Pancakes”,  
:description =\> “Flapjacks by mail.”  
:price =\> 0.50, :quantity =\> 10)  
File.open(‘super-e-commerce.html’, ‘w’) { |f|  
f.write("Click this button to buy " +  
“a quarter and ten pancakes:” +  
cart.checkout\_button +  
“”)  
}

Of course, this is not a complete illustration of the features. See  
the  
documentation for a more complete tour.

# Author

Pete E. (pete dot elmore at gmail dot com)

homepage:  
debu.gs/google-checkout

download:  
[http://debu.gs/documents/download/google-checkout-download-0-1-0](http://debu.gs/documents/download/google-checkout-download-0-1-0)
