how to implement a payment system in rails [closed

2019-04-21 00:00发布

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?

2条回答
手持菜刀,她持情操
2楼-- · 2019-04-21 00:20

You should checkout ActiveMerchant.

FYI Peepcode has a post on this:

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

查看更多
Ridiculous、
3楼-- · 2019-04-21 00:40

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.

查看更多
登录 后发表回答