What are some of the popular web payment API/services that can be easily integrated with ruby on rails framework? I have tried using PayPal the standard version and it was not too flexibler. I have never tried the pro version. Can you guys suggest other alternatives out there that are easy to use, secure, not too hefty on the commission as well and have subscription/recurring payment functionality.
There is Stripe. You can see nice short screencast by Ryan Bates here: http://railscasts.com/episodes/288-billing-with-stripe
There are also two other options with screent cast, namely PayPal http://railscasts.com/episodes/141-paypal-basics
and Active Merchant http://railscasts.com/episodes/144-active-merchant-basics
Authorize.net has an API with sample code for Ruby and several other languages. No direct rails plugin, but I am sure it can be easily incorporated. I used the PHP version and incorporated it in under an hour. It has all the functions that you mentioned in your post.
Related
I have an application in rails that make request to other microservices using httparty. Other microservices are also written in Rails. Right now, i hard coded all the api urls used in httparty, what will be a more elegant way to organize them?
This is a great question, although it's way too broad to be answered meaningfully here without more specifics on the problem you're solving.
However, if I were you, I'd start by reading the source code for existing API libraries. It's a fantastic way to learn about API design principles from very practical examples in products you likely use every day.
Personally, I've found that the Stripe Ruby SDK (https://github.com/stripe/stripe-ruby specifically, lib/stripe/api_operations), the Slack Ruby SDK (https://github.com/dblock/slack-ruby-client), AWS Ruby SDK (https://github.com/aws/aws-sdk-ruby though this one's pretty big), and Github Ruby SDK (https://github.com/aws/aws-sdk-ruby) are all well designed and worth studying.
How to implement payment options by multiple banks on merchant's website.
There are some great tutorials on rails casts by Ryan Bates, check out the E-Commerce tutorials here
Check out Active Merchant for payment processing.
If you are looking for a fully functional commerce platform built on rails, then Spree Commerce is the way you want to go.
Another good option for payment service provider with full features build on Rails is https://www.emerchantpay.com/
I've been searching high and low for the best solution to this: making paypal adaptive payments (specifically, chained payments) through rails 3. I found activemerchant, but I don't think any of the adaptive payments additions work with rails 3. It wasn't clear from their documentation, if they had any.
ActiveMerchant sounds like it would be an ideal solution, because we hope to move beyond paypal eventually. However, I'm open to other options--especially fast, easy, and well-documented solutions!
Have you looked at Tommy's paypal_adaptive gem? I've had good luck using it for 1 recipient payments. It should also be able to support chained payments.
https://github.com/tc/paypal_adaptive
Unfortunately it doesn't support the embedded payments that keep the user experience on your site while registering with PayPal.
If you have trouble you can enable debug info in request.rb and ipn_notification.rb.
http.set_debug_output($stdout)
Installation instructions: http://tommy.chheng.com/index.php/2009/12/paypal-adaptive-ruby-gem-released/
You can also try the active_paypal_adaptive_payment gem based off Active Merchant. It works pretty well.
I have a rails application using the Facebook API. I've seen several different Ruby gems for integrating with Facebook, but they look dated.
Is it best to write low-level calls myself? Is there a decent and current gem available?
Have any of these gems changed recently?
I'm beginning a new project -- which gem should I use as of September, 2012?
The Koala Gem is the way to go.
These Railscasts from July will tell you all you need to know about interacting with the Social Graph in Ruby and in Rails (both are paid episodes):
#361: Facebook Graph API: Learn how to use the Facebook Graph API with the Koala gem to fetch data from Facebook and post content through a user. Here I delve into permissions, error handling, and more.
#363: Facebook Open Graph: This episode builds on last week's episodes and shows how to integrate Facebook further through the Open Graph protocol. You will also learn how to tunnel your local server and move Facebook communication into a background process.
Having used it quite recently, I'd suggest Koala too. Pretty well documented, goes through the changes in api pretty smoothly, still maintained, and arsduo is a pretty cool guy.
According to this link,
With Facebook’s Graph API and the creation of the Open Graph protocol, it is now easier then ever before to read and write data from and to the “social graph”.
...
The following are proven to work with Ruby 1.9.x and Rails 3.0.0.
Gems
Cardinal Blue’s rest-graph
miniFB
FBGraph
Koala
Mogli
Plugins - Facebooker2
Middlewares
OmniAuth
rack-facebook
I would suggest either mogli or koala.
One known to have an active user base is facebooker2. The documentation is not really sufficient right now but its mailing list is very active, you get responses pretty quickly.
I've dug into the Koala deeply for my project, and I found it to be well written, solid code that has full test coverage. The main author, Alex Koppel, definitely knows what he's doing and he cares about the developer community. I needed to make a few improvements, which was easy thanks to the good architecture of the gem, and Alex was helpful in merging the changes into the master branch. Highly recommended.
The oauth2 from Intridea supports Facebook's Graph API.
Blog Post: http://intridea.com/2010/4/22/oauth2-gem-just-in-time-for-facebook-graph?blog=company
On github: http://github.com/intridea/oauth2
The sample source of Heroku's facebook application was used mogli,but now is koala.It is the best and great gem.Have a good group -- koala-users
I am investigating potential Rails plugins or Gems to help develop a SAAS type app. Specifically I am looking for help in two areas:
Restricting access to certain areas of the app based on the account's plan. For example, a bronze account allows access to some functionality, upgrading to silver unlocks access to new features and functionality. Basically, just controlling what accounts have access to what controllers.
Managing subscriptions, invoicing and taking payments. This app will be charging on an annual or quarterly basis, there's a 30 day free trial with no payment details needed up front, and I think the intention is to use PayPal Website Payments Pro (although that is not set in stone).
Given the above, can anyone recommend any Gems or plugins? I have had a look at the SAAS Railskit and I am not opposed to spending a bit of money. However, I'd certainly want to hear good things from people who have used it first, and also how easy it is to pick appart the Railskit and apply it to my own application (as I am not starting from scratch here - needs to integrate with Authlogic too).
Thanks in advance for your help.
Bruno Bornsztein offers a Rails engine that implements a SaaS site. Look for striped_rails on GitHub.
You might want to look at the open source example application for a Rails Membership/Subscription/SaaS Site from the RailsApps project. It comes with a tutorial that explains the implementation in great detail. It does what you describe using Devise for authentication and Stripe for billing.
My SaaS Rails Kit does integrate well with pre-existing apps... many of my customers do that. And the testimonials at the site are real. :) Plus there are many other similar testimonials that I haven't published -- a lot of good things have been said about it. :)
While there are quite a few different gems out there which do different things different ways, I would definitely suggest that you start with these:
activemerchant — I would use this for payment processing. It is honestly the best (and most extensible) gem out there, and its especially well-tested for PayPal usage, although I'd look elsewhere for SaaS billing because PayPal is utter crap.
declarative_authorization — This is probably the most extensible plugin for authorization, which allows different users with different roles to do different things. For instance, you can build roles for each plan.
You should also take a look at the following Railscasts:
"Declarative Authorization" - http://railscasts.com/episodes/188-declarative-authorization
"Authorization with CanCan" - http://railscasts.com/episodes/192-authorization-with-cancan
"PayPal Express Checkout" - http://railscasts.com/episodes/146-paypal-express-checkout
"Integrating Active Merchant" - http://railscasts.com/episodes/145-integrating-active-merchant
Hope this helps!
You would also need subdomain routes, for restricting your user into its own subdomain.