Omninerd published an introduction to ActiveMerchant.
AM is a credit card processing library extracted from Shopify in much the same way Rails was originally extracted from Basecamp.
Processing Credit Cards with Ruby on Rails
The article talks about Authorize.net as a payment provider but ActiveMerchant supports a variety of gateways such as Authorize.net, Moneris, TrustCommerce, LinkPoint, Psigate, Paypal Payments Pro, Paypal Payments Standard, eWay, USA ePay, NoChex and Chronopay. All of the supported gateways are in production use in Shopify.