使用Rails定期计费-我有什么选择? [英] Recurring billing with Rails - what are my options?

查看:85
本文介绍了使用Rails定期计费-我有什么选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在加入之前,我想知道我所有的选择是什么,如果可能的话,它们的优缺点.

Before jumping in I'd like to know what all of my options are, and, if possible their pros and cons.

我认识的两个人都在使用ActiveMerchant或paypal_recurring gem,但它们会满足这些要求吗?

The two I know of are using ActiveMerchant, or the paypal_recurring gem, but will they satisfy these requirements?

  • 能够按月和按年计费
  • 能够暂停,取消帐户等
  • 处理过时的卡详细信息或付款失败

paypal_recurring gem的待办事项列表包括添加对IPN的支持"-如何不具有这种影响功能?

The to-do list for the paypal_recurring gem includes 'adding support for IPN' - how will not having this impact functionality?

我知道有railskit SaaS,但我还是想自己编写一些代码,因为railskit仍在3.2.1上.

I know there is the railskit SaaS but I'd rather code something myself as the railskit is still on 3.2.1.

我知道有诸如cheddergedder/chargify之类的服务,但它们会把您束缚吗?他们只是美国吗?他们值得考虑-还是通常只针对非开发人员?

I know there are services like cheddergedder/chargify etc, but do they tie you in? Are they US only? Are they worth considering - or are they usually just aimed at non-developers?

谢谢.

推荐答案

我刚刚完成了此过程,因此,我将尝试阐明您的选择.我最终将Paypal Express Checkout用于通过Paypal进行的所有重复购买.我们有一个自定义滚动的定期结算设置,该设置通过 Authnet 每月向客户的信用卡收费,但由于我们需要一个国际解决方案,而贝宝(Paypal)是支持我们所需货币的唯一支持者之一,而且也不完全是梦code以求的代码.

I just finished going through this, so I'll try to shed some light on your options. I ended up using Paypal Express Checkout for all recurring purchases through Paypal. We had a custom-rolled recurring billing setup that charges a customer's credit card monthly through Authnet, but had to switch because we needed an international solution, and Paypal was one of the only ones that supported the currencies we needed, and wasn't entirely a nightmare to code.

您可以使用ActiveMerchant通过 paypal-recurring 处理通过Paypal的通信,然后进行滚动我自己的IPN解析器,并在铁路广播的帮助下.另一个对我有很大帮助的链接是,尽管所有:txn_type值最终变得不同.

You can use ActiveMerchant for recurring billing with this plugin, though keep in mind that it is not officially a part of ActiveMerchant, and therefore is subject to break if ActiveMerchant changes how it handles certain things. Because of that, I ended up using the paypal-recurring to handle communication through Paypal, and then rolled my own IPN parser, with help from Railscasts. Another link that helped me a lot was this, though all the :txn_type values ended up being different.

关于最后一个链接,以下是我特别注意的4个:txn_type:

With regards to that last link, here are the 4 :txn_types that I specifically watch out for:

  1. express_checkout-第一次回发.
  2. recurring_payment_profile_created-在用户首次订阅时首次回发.
  3. recurring_payment_profile_cancel-如果用户取消从Paypal网站的订阅,则发送.
  4. recurring_payment-资金已转入您的帐户.这是我每月等待续订之前的等待.该帖子还附带了payment_status,必须为completed.
  1. express_checkout - first postback.
  2. recurring_payment_profile_created - sent on first postback when the user first subscribes.
  3. recurring_payment_profile_cancel - sent if user cancels subscription from Paypal's site.
  4. recurring_payment - Money has been transferred to your account. This is what I wait for before I renew their subscription on a monthly. This post also comes with payment_status, which needs to be completed.

您提到的其他内容,例如处理失败的付款和过期的卡,都是通过您的Paypal帐户处理的.

The other stuff you mentioned, like handling failed payments and out-of-date cards, is handled through your Paypal account.

仅需警告一下-我最终使用Paypal的唯一原因是因为它被普遍认可和信任,并且接受国际货币.他们的站点上有大量的文档,其中大多数是多余的,令人困惑的,而且太长了.我的建议是确保您确实希望/需要处理经常性付款,因为它们很难正确实施,并且可能比它们值得的麻烦更多.

Just a word of warning - the only reason I ended up using Paypal is because it is universally recognized and trusted, and it accepted international currencies. There is an enormous amount of documentation on their site, and most of it is redundant, confusing, and entirely too long. My recommendation is to make sure you really want/need to deal with recurring payments, as they are difficult to implement correctly and can be more trouble than they're worth.

这篇关于使用Rails定期计费-我有什么选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆