10

I am new to the rails world and am in the process of setting up a small rails app for a client. One of the requirements is that the user enters their credit card which gets charged for a specified amount.

I haven't had much experience with payment systems. I believe active merchant gem can be used for this purpose but how does actually charging the card work out and for testing purpose will I be able to charge a dummy account? From your experience, is it safe to go with a provider like paypal?

Omnipresent
  • 29,434
  • 47
  • 142
  • 186

2 Answers2

5

You should checkout ActiveMerchant.

FYI Peepcode has a post on this:

http://peepcode.com/products/activemerchant-pdf

thenengah
  • 42,557
  • 33
  • 113
  • 157
  • 1
    Don't forget that you would need to comply with PCI-DSS requirements! – Zabba Jul 14 '11 at 01:36
  • getting that peepcode. seems helpful. thanks. – Omnipresent Jul 14 '11 at 01:58
  • 2
    ActiveMerchant is the way to go. Be aware though that the biggest hurdle to online payments is actually getting a merchant account with a bank. If your client doesn't already have a merchant account with their bank (this allows them to accept credit bard payments) then have them start that right away as it takes time to get everything approved (assuming that they can, it is not always easy). Also, when they have their merchant account be sure to get all of the payment gateway details, you will need to to ensure that Activemerchant will play nicely with it. – sosborn Jul 14 '11 at 02:02
  • I am recommending braintree to the client as I've heard good things about it. I'm also assuming that braintree plays well with activemerchant – Omnipresent Jul 14 '11 at 02:28
  • 1
    The peepcode link doesn't work anymore. – Backo Oct 16 '14 at 08:33
1

Watch out, if you store or accept credit cards directly on your website you need to be PCI DSS compliant.

There are a number of solutions out there to overcome this issue, the first notably is to delegate the payment infrastructure to a third party like Recurly, since it also operates in Europe with different providers, but it's more on recurring payment.

The primary choice in US would be Braintree or the newest Stripe.com.

Braintree has another solution to keep the user never leave your site, it's called Transparent Redirect.

kain
  • 5,510
  • 3
  • 27
  • 36
  • I read about braintree's transparent redirect which doesn't involve using activemerchant either, however, not able to find a tutorial type of article that shows how it can be implemented in rails. – Omnipresent Jul 14 '11 at 12:45