
by Cody Fauser, ActiveMerchant committer and Shopify developer.
Most online businesses need to receive payment. If you’re developing with Ruby, the standard for credit card authorization and capture is ActiveMerchant.
ActiveMerchant provides a consistent interface to over 30 gateways all around the world and has processed millions of dollars of transactions since 2006. This 70 page book starts with a simple payment and steps through the development of database models and gateway interaction code within a Rails application.
You’ll also learn how to write a comprehensive test suite and integrate the Acts as State Machine plugin to build a reliable payment processing system. Finally, you’ll learn about industry standards and security precautions.
Many books show you how to build a Rails-based shopping cart, but this is the only book to take you the rest of the way through to payment authorization and capture.
Purchase includes downloadable code samples used in the book.
NOTE: This PDF does not talk about recurring billing. It does mention credit card storage regulations but recommends that you use a third-party service to store credit card numbers.
Examples use the Braintree Payment Gateway but are relevant for any gateway supported by ActiveMerchant.


Revision 2 (Notes) · Updated: May 11, 2009 · Length: 74 pages · 2 MB
“This is a great ebook on a great resource...For all serious charging Rails projects, this is a must-read.” Simon, in blog comment
“Cody Fauser's ActiveMerchant PDF from PeepCode was invaluable in giving me a start to integration.” Robin Fisher
“The ActiveMerchant ebook saved me untold hours in adding payment capabilities to my startup, OtherInbox.com.” Mike Subelsky, Co-founder of OtherInbox.com
Login or signup and enter the code on your account page. If it is still valid you will be able to browse the list of products and redeem one!
Save money and learn a lot, too! PeepCode Unlimited gives you access to everything we publish for a full year. A 10 Pack will save you $20 and a 5 Pack will save you $5.
Site licenses and team subscriptions are also available! Contact peepcode@topfunky.com with the number of developers you have and the number of credits you would like to buy and we will send you a personalized quote.
“PeepCode is awesome!” Tim O'Reilly, O'Reilly Media
“I suspect there are a lot of smart DF readers out there who know nothing about the Unix-y aspects of Mac OS X, would like to, but never found a good way to get started. This screencast is it.” John Gruber, Daring Fireball
“Mercurial is just what I was looking for. Happy to pay to support people making such high-quality and informative screencasts.” Jason Kottke
“Absolutely fantastic - I haven't seen a PeepCode screencast before and I'm super impressed with the level of graphics/audio...I just finished it and it really is a great intro. Well done.” David Kaneda, author of jQTouch
“These things are fantastic and the price is a steal. I strongly urge you to support this effort and buy the episodes. What a terrific way to learn!” Scott Barron, Rails Core Committer