<?xml version="1.0" encoding="UTF-8"?>
<episode>
  <created-at type="datetime">2008-04-09T08:32:53Z</created-at>
  <description>&lt;p&gt;In this episode you will learn how to use CIM API of Authorize.net gateway to post transactions and add recurring billing logic.&lt;/p&gt;&lt;p&gt;&amp;nbsp;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.&lt;/p&gt;&lt;p&gt;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. &lt;/p&gt;&lt;p&gt;&amp;nbsp;Resources: &lt;a href="http://guide.zepho.com/version1/"&gt;How to create domain model&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The download includes the source code and the billing domain model diagram that is capable of handling recurring charges.&amp;nbsp;&lt;/p&gt;</description>
  <discuss-link>http://bparanj.blogspot.com</discuss-link>
  <download-link>http://www.zepho.com/download/active_merchant_authorize_net2.zip</download-link>
  <duration>14 mins</duration>
  <id type="integer">65</id>
  <published-at type="datetime">2008-04-09T08:32:53Z</published-at>
  <sequence type="integer">65</sequence>
  <size type="integer">34</size>
  <title>ActiveMerchant with Authorize.net in Rails Part 2</title>
  <updated-at type="datetime">2008-07-16T16:32:28Z</updated-at>
</episode>
