Welcome Guest

Ruby Plus

Free Ruby and Rails Screencasts
Navigation: Home | Services | Mentoring | Login | Signup | Archive | RSS Feed

Search

 

Services

Hire Us

Become a Member

Sign up for free membership and get notifications for members only free Ruby and Rails screencasts. Privacy

Rails Meetup

If you live in the bay area, check out Silicon Valley Ruby Meetup

Home Office

For those who are curious, here is my Home Office

Recommend Me

Recommend Me

Please Support

Greenpeace

Subscribe to RSS

Bookmark this Site

Required

Get Quicktime Player
65
April 09, 2008
Discuss

ActiveMerchant with Authorize.net in Rails Part 2

In this episode you will learn how to use CIM API of Authorize.net gateway to post transactions and add recurring billing logic.

 For recurring billing you can check the last_charged_at field in Subscriptions table and if it was successfully processed you can charge the customer based on the interval. Interval attribute can store the frequency of charging a customer for subscriptions. I am using months as the unit for this attribute.

Write a method in CustomerProfile model to check the subscriptions table for any pending charges that must be posted to the gateway. Use this class method in a Rake task that will be run by a CRON job.

 Resources: How to create domain model

The download includes the source code and the billing domain model diagram that is capable of handling recurring charges. 

Signup now to download the episode for free.

Recommend Me
Privacy Policy | Site Map
Copyright © 2007 - 2008, rubyplus.org