February 9, 2011 Paypal Rails 3 Recurring Billing
Photo: [flickr]
If you really want a treat, at a whole new level, check out this one. It isn’t a cookie, but a sweet Gem that just got sweeter. Be sure to fall in love with the gang over at Shopify for creating Active Merchant. Active Mechant is a wrapper for Paypal’s API to help hacks like me talk to Paypal’s API via my Ruby on Rails apps (other gateways too) effortlessly. On top of that enormous time savings, thanks to Van Tran et Raymond Law with SOAP, we now have recurring billing with Active Merchant! If the below means ANYTHING to you, be sure to check it out.
::GATEWAY = ActiveMerchant::Billing::PaypalRecurringGateway.new()
//
response = GATEWAY.create_profile(nil, :credit_card => credit_card,
:description => 'Good times',
:start_date => Date.today,
:period => 'Month',
:frequency => 1,
:amount => 1000,
:initial_amount => 1000,
:auto_bill_outstanding => true)
//
If anyone is crazy enough to be a Ruby hack and needs help with this let me know. I will make a sample app on github to clone otherwise Van does a nice job.
Want to comment? Comments: 2
Tweet this


2 comments so far
So I’ve been searching thru the rdoc for the ActiveMerchant (http://rubydoc.info/gems/activemerchant/1.15.0/frames) and can’t find anything regarding PaypalRecurringGateway. Is this not in the public version of ActiveMerchant? Or is it in a pre-release version?
Thanks!
check out VanTran at link below. It is a modified gem that you call activemerchant from his git. Works nicely, cant find bug with it.
http://www.naivehack.com/2010/11/24/active-merchant-paypal-recurring-payment/
Add a comment