I’m in the process of implementing invoce functionality to my Rails app.
The
service is monthly billed. I already have an Authorize.NET test account.
What I would like to do is bill the customers automatically after a
certain
interval has passed after the last payment, sending them the invoice to
pay
for it again and perform some action if the invoice has not been paid in
time.
What would be the best way to do this? A rails controller running as a
cron
job?
What would be the best way to do this? A rails controller running as a
cron job?
The best way I’ve found is just to add an OfflineProcessController with
the functionality I need. I use a before_filter to validate only the IP
address on which I’m running cron, so nobody else can access these
methods.
You can get ARB from Authorize.net ($10/mo) and let them charge the
customer each period instead of sending them a bill. Does the amount
change each month? Then you can use Billing Orchard and load invoices
via a simple API. It stores the credit card and bills a.net each
month or it can send an invoice via email to your customer. BO has an
interface for your customer, too.
rbaldwin, Al Evans - Thank you very much for the help, I really
appreaciate
it!
@Al Evans: You appreach seems simple and flexible, I’ll definetly try it
out, thanks for the tip! @rbaldwin: BackgroundRb also seems to be great, as simple as Al Evans
approach… I’ll try it too.
Once I get everything set up and working, I’ll let you know which one
worked
best for me.
If you prefer to write ruby instead of a shell script, you could also
write a custom rake task ( #66 Custom Rake Tasks - RailsCasts ), and call
that using cron.
Regards,
Chris
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.