How can I bill within an application - currency

I've been programming for years, and I've also done a few professional programming projects. I recently had a friend ask about creating an e-commerce site, but I had to turn her down because I had never worked on a web application that can bill. I also might need to write a subscription-based web service in the future. My question is, how do I even get started with billing? I've never found a guide about this, and I barely know how bank accounts work since I don't manage my own one (I have an excuse for this since I'm only 16).
I don't know if the answer is language dependent, but if it is the languages I'm interested in are Python, C/C++, and Java.

There are lots of ways to go about setting up e-commerce sites;
If you don't have any experience whatsoever, and don't want to get into anything "complicated", i would suggest going with a customizable web "storefront" hosted by someone else, pre-integrated with credit card processing, etc. There are tons of options for these online. Just search google for "web storefront". Yahoo! even has such a service:
http://smallbusiness.yahoo.com/ecommerce/sellonline.php
Going beyond that, It's pretty easy to integrate with someone like PayPal. They have all sorts of options from the most basic (use a link to send someone to their site with query string parameters to let paypal know what the user wanted to buy):
https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/home
Beyond that level, you will need to signup for a merchant account, or other similar sort of service, like the one offered by authorize.net (who I like):
http://www.authorize.net/
There are components you can buy for most major web development platforms like .NET, JSP, etc. Perfect example is dotnetcart. These components provide out-of-the-box, easy-to-setup integrations with major CC processing companies, as well as out-of-the-box shopping cart implementations:
http://www.dotnetcart.com/
Finally, most merchant services / payment gateways provide web services for direct integration.
PS.) Never ever ever store CC numbers ; )

I would look at paypal's api to get started. You might not want to stick with them but it is a good starting place to learn about dealing with credit card clearing houses and such.
Here ya go.

You'll typically interface with a 3rd-party for doing banking transactions. One that I've work with in the past is Authorize.Net but there's plenty out there (PayPal is another fairly popular one with a decent API).
Basically, the best approach is to do as little as possible and let the 3rd party handle all the "hard" stuff (such as security, managing credit card details and so on).

Related

What are the main differences between using ActiveMerchant and a specific API?

I am new to rails and am starting to learn about how to integrate payment processing. I am trying to find some direction about where to focus my learning about payment processor integration.
From what I understand ActiveMerchant is an extraction from Shopify that allows you to easily integrate many of the major payment gateways such as Stripe and Braintree. I also understand that these platforms also have their own APIs for their specific services.
There seems to be obviouse benefits to using activemerchant if there is a possibility of wanting to switch payment processor in future or if you intend to use different processors accross different sites.
My question is what are the drawbacks of using ActiveMerchant as apposed to a specific API. Do I take more responisibility for security if I use ActiveMerchant and is it much more complicated?
My reason for asking is I do not want to focus my time and effort on learning a specific API when I could learn ActiveMerchant and use it accross all providers.
Thank you :)
I've only used ActiveMerchant once (for an e-commerce system), and used it because of its integration with the respective payment gateways we required
--
Case For Use
The problem you have with "native" APIs is that they have a habit of changing when you least expect it, making all that custom (brutal) work to originally implement them very difficult to debug when it suddenly blows up
I've found ActiveMerchant is a great "buffer" between Rails development & the payment providers. If Shopify are getting paid to handle payments for their users, surely it's a good thing that they'll provide an up-to-date gem with all their experience
Although you'll have to manage much of the integration yourself (still), ActiveMerchent certainly acts as a very reliable abstraction layer for accepting payments
--
Drawbacks
In my experience, the main drawbacks are that ActiveMerchant may not support some of the more "niche" features of particular API's (for example, currency conversion or similar). Although Shopify, by all accounts, are very liberal with the inclusion of functionality upon [pull] request, you still generally have to abide by their specs
Another thing to consider is that you may have to "bend" the API's to fit your application. In our company, we have a lot of different ways to create the wealth we need, and as such, we don't want to rely on "accepting payments" with our providers.
We like to create integrated experiences, which invariably means giving people the chance to purchase things like premium accounts, or in-app upgrades etc. When you get into the world of "micro payments" (which we're strictly not; we just have varying ways to attract buyers), you begin to have to make the APIs work by using very custom implementations
--
Coverage
From a developer perspective, the main benefit that ActiveMerchant provides is that you are "covered" with so many different payment providers.
Hawking back to my comments regarding API changes, this means that if you integrate your app with the ActiveMerchant interface correctly, you should be able to work with a multitude of many different payment providers
The list of supported providers is monumental - meaning that if you want to change your payment provider from Paypal to Stripe or something - you'll be able to do so by not editing your core code a huge amount
--
Resources
Finally, because ActiveMerchant is a base-standard, you'll get much more support than direct implementation with the various APIs. This is reflected in the likes of Railscasts:

The best aproach to translate a page in a web app

I'm developing a web application using Spring, JSF 2 and Primefaces 3. I want the user to be able to choose from different languages. I don't want to use Google Translate. Which is the best approach to translate my website?
Take a look at http://www.coreservlets.com/JSF-Tutorial/jsf2/#Properties
Basically, you create a properties file for each language, like messages.properties, messages_fr.properties, messages_es.properties etc. and the appropriate one is loaded according to the locale.
The user can also select the language herself, take a look at the next tutorials at that site to see how to implement it.
Are you asking how to implement this technically or how to get the content of your site translated?
For the former I trust you can find a guide or five.
For the latter if you don't want to use an automated service like Google Translate then you're going to need humans to do it for you. Unless you have multilingual friends who owe you a favor or, say, a giant, enthusiastic userbase like Facebook or Twitter has, you're not going to get this for free. Your options, basically, are to pay for the services of one of the many, many companies out there that do this, or find multilingual individuals on your own, e.g. by calling local universities' foreign language departments or international student organizations, or posting on Craigslist and the like. As with web development contractors, I think it's safe to assume you get what you pay for.
When you say you don't want to use Google Translate, do you men GT specifically, or any such service? Because if you're not using any translation service, you'll have to maintain versions of each page on your site in different languages. And maintain them.
Come to think of it, you probably have to take this approach as none of the online translation services provide a good enough native translation.
There's probably some commercial machine-translation packages out there, but they don't come cheap, I imagine.
Alternatively, employ an army of translators - there's websites out there where you can hire translators.
You'll probably want to do a search for translation software, then figure out how much it'd cost you.

Ecommerce Subscription for Rails

Have seen some conversations revolving around this, but hoping for some current input as to perhaps the best libs and services available for Rails developers at the moment who are implementing a subscription membership based website.
I'm interested in any libs or frameworks with which you may be familiar through GitHub or elsewhere as well as what service has given you the best experience so far for clients and your own sanity? I'm leaning towards paypal and perhaps also including Google Checkout, however there are certainly a lot of other options.
I'd like for it to be clean and to appear as integrated into the website as possible while carrying the trust of a larger service provider such as PayPal and Google.
Additionally, these are mostly micro payments at around $1.00 USD. Sometimes purchases go up to $15 to $30.
EDIT: Since initial post I've found SaaS Rails Kit (http://railskits.com/recurring_billing/). Has anyone had experience with this vs Recurly? Doing some research as per the first answer, it appears Recurly is the superior option at this point for our model, however this Rails Kit may be an even better option if it has met some very positive experiences in comparison with other options.
The one I prefer: Chargify (soon to be available on heroku)
Another I know but haven't used: Recurly (soon on heroku too)

Recommended Rails plugins for software as a service app

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.

Rails for ecommerce site

I was planning on using RoR for an upcoming e-commerce site but keep reading
comments that give the impression that this framework is not yet fit for this type of a commercial application.
What is the state of it? May it be used for large scale online stores etc?
Is compatibility and the frequently changing framework an issue to worry about?
Late answer... but I feel I should share some of the latest stuff available.
Is compatibility and the frequently
changing framework an issue to worry
about?
No. But it sounds like you are a beginner with Rails -- anyone starting a big e-commerce project should consider sticking with a framework they are already comfortable with.
If you definitely want a Rails app and your site is primarily an e-commerce shopping site, I recommend you look at Spree (http://spreecommerce.com/).
If your site is primarily a web application with a small purchasing component, consider using ActiveMerchant directly to hack together your own simple shopping page.
If you are making a primarily e-commerce shopping site, you would do well to at least consider non-Rails solutions. There are so many options for standalone web stores, shopping carts linked to CMS apps like WordPress and Drupal, third-party services for a fee (e.g., Shopify for shops, Chargify for subscription services) and many of them can be customized with minimal coding.
Rails is up to the task, but if you aren't already a "Rails guy" there's no particular reason to choose it for a new e-commerce app.
yes, rails can do it quite well. check out active merchant site, as well as shopify, which is a rails site specifically for ecommerce. as far as changes to the framework, i've found them pretty easy to keep up with on our applications.
Agree with other's posts about activemerchant. That combined with someone like Braintree as the gateway (who are programmer oriented) make it pretty simple to do.
It depends on what features you want in your system.
Chris mentioned some tools for payment processing and order / cart management.
If you want something for a 'large scale online store' then I'm not sure there is anything yet. Specifically when I worked with ATG Dynamo Commerce Server, there was a massive amount of effort invested in their pricing, discount and promotion elements.
Very late to answer but try out http://www.ror-e.com
https://github.com/drhenner/ror_ecommerce
Disclaimer: I wrote it, but it is more developer friendly and starts you off with a lot of best practices baked in. Good luck

Resources