如何在 Rails 应用程序中处理定期/订阅计费?
我无法使用 Chargify、Recurly、Spreedly 或任何这些应用程序,因为我不在美国。事实上,我在牙买加……很多公司都不支持牙买加。
但我正在尝试推出一个自定义订阅管理解决方案 - 但考虑到这是我的第一个网络应用程序 - 我认为这对我来说可能是一项太大的任务。
有没有什么宝石可以解决这个问题?这些是要求:
- 所有注册的用户都会自动获得 X 天的免费计划
- 在 X 天结束时,应提示他们升级
- 如果他们不升级,则在 X 天结束时他们的帐户将被锁定/禁用
- 如果他们的帐户已被禁用,他们可以升级并进入结帐页面(由 2checkout 提供支持,因为这是我现在必须使用的)。
- 然后,一旦他们升级并选择了计划,系统应该自动增加他们的分配(客户端数量、项目数量、存储空间等),
所以我不需要系统实际处理信用卡的处理等等,更多的是我需要的订阅逻辑、机型限制、升级降级。
完美的解决方案是一个得到良好支持的 Rails gem,我可以将其包含在我的 Gemfile 中。
如果您没有,只需发送任何/所有可能的解决方案,我可以从那里获取。
谢谢。
I can't use Chargify, Recurly, Spreedly or any of those apps because I am not based in the US. I am in Jamaica, actually...so many of these companies don't support Jamaica.
But I am trying to roll a custom subscription management solution - but given that this is my first web app - I think it might be too big a task for me to take on.
Are there any gems that can handle this? These are the requirements:
- All users registered automatically get on a free plan for X days
- Towards the end of X days, they should be prompted to upgrade
- If they don't upgrade, at the end of X days their account gets locked/disabled
- If their account is disabled, they can upgrade and be taken to a checkout page (powered by 2checkout, because that is who I have to use for now).
- Then once they upgrade, and have selected a plan, the system should automatically increase their allocations (# of clients, # of projects, storage space, etc.)
So I don't need the system to actually handle the processing of the credit cards, etc. It's more the logic of the subscription, restrictions on the models, upgrading and downgrading that I need.
The perfect solution would be a well supported Rails gem that I can include in my Gemfile.
If you don't have that, just send any/all possible solutions and I can take it from there.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以查看 Saasy。它是一个独立的 Rails 应用程序(不是插件),您托管在子域上并使用 SSO/REST 协议与其进行通信。它可能无法满足您的需求,但您也许可以扩展它或大致了解它的工作原理。
You can look into Saasy. It's a stand alone Rails app (not a plugin) that you host on a subdomain and communicate with it using SSO/REST protocols. Probably won't fit your need as it is, but you may be able to extend it or get a general idea of how it works.
有一个名为 Chargify 的出色解决方案,它是可用的 Heroku 之一。 com/" rel="nofollow">附加组件,您可以在这里看到它:https:// addons.heroku.com/chargify 和 http://devcenter.heroku.com/articles/chargify
通过合理的费率,您可以在 Rails 应用程序中管理所有定期/订阅计费,我希望这是有用的答案。
There is a great solution called Chargify, its one of Heroku available add-ons, you can see it here: https://addons.heroku.com/chargify and http://devcenter.heroku.com/articles/chargify
With a reasonable rate, you can manage all the recurring/subscription billing in your Rails App, I hope this is useful answer.