HungryWolfTShirts : Cartman and Stripe
At a recent ruby meetup, friend of a friend introduced me to Scott Rocher, CTO at Tonx coffee. I asked him for advice on my e-commerce project, and he kindly suggested looking into a couple of gems.
Cartman Given that I had already made item objects to be purchased, Scott recommended Cartman, a Redis backed gem that builds carts (or baskets), and calculates totals, number of items, etc. You can do things like
cart = Cartman::Cart.new(user_id) cart.add_item( id: 1, type: "TshirtA", unit_cost: 10, quantity: 1) cart.add_item( id: 2, type: "TshirtB", unit_cost: 20, quantity: 2) cart.total => 50 cart.quantity => 3 cart.destroy!
Note - all cartman costs are in cents!
Stripe.js Easy to implement, safe to use. Comes with a spiffy pre-made modal form. Credit card information never hits your server! Rocking it live in test-mode.














