ActiveMerchant works great as a standalone library as well as a Rails plugin.
It was designed for (sic) use in Ruby on Rails web applications and integrates easily as a plugin, but it also works great as a stand alone library.
gem install activemerchant
source share