网站付费会员的计划工作流程是什么?
我正在使用 Zend Framework 用 php 构建一个付费会员网站。我需要制定一个向用户收费的工作流程。我们有许多包月套餐,每个套餐都提供不同程度的服务。例如:
免费计划允许用户创建 1 个工作区和 1 个用户
基本计划允许创建 5 个工作区和 3 个用户,费用为 15 美元/月
高级计划允许创建 20 个工作区和 10 个用户,费用为 35 美元美元/月
一个重型计划,允许创建 50 个工作区和 30 个用户,费用为 65 美元/月
我现在很可能会与 AlertPay 等第三方网关集成 - 但套餐是每月的,:( 抱歉,我还没有到目前为止,您实际上还没有在任何月度会员服务网站上注册,并且想知道您如何每月向用户收取增量费用,
您是否坚持要求他们每月输入信用卡详细信息,或者您是否真的一次又一次地要求他们提供详细信息。你按月收费——我真的怀疑后者是否可以考虑,
或者用户是否提前支付他们希望使用的月费——通常
情况下我想给我的用户提供 10 天的免费试用期。注册后即可获得所有付费套餐。我将如何在代码中实现这一点。我已经设置了我的应用程序,并且正在运行,就好像所有用户都是管理员一样,即没有任何保留,现在想要构建这些限制来货币化,但我对工作流程、代码实现和数据设计有点迷失。
提醒我是否有任何在线服务或开源应用程序可以用来插入我的应用程序并为我处理网站的这方面?
更新=========================
非常全面的答案,但是在开发级别 - 我应该在数据库中存储什么以及如何设计表必需的。我不明白每月订阅的每个月都会向我提供网关的网址进行回发。就像数据库的基本要素是什么一样。
I'm building a paid membership site in php using the Zend Framework. I need to work out a workflow for charging users. We have a number of monthly packages each offering varying degrees of services. For an example:
A free plan which allows users to create one workspace and one user
A Basic plan which allows to create 5 workspaces and 3 users and costs 15 dollars/month
A Premium Plan which allows to create 20 workspaces and 10 users and costs 35 dollars/month
A Heavy Duty Plan which allows to create 50 workspaces and 30 users and costs 65 dollars/month
I would mostlikelye be integrating with a third party gateway like AlertPay for now - however the packages are monthly and :( sorry to say I haven't actually signed up on any monthly membership service site so far and wonder on how do you incrementally charge a user each month.
Do you insist that they enter their credit card details each month or do you actually ask them for the detaisl once and then you charge it monthly - I honestly doubt the latter can even be considered.
Or do users pay in advance for how many months they wish to use - how is it done normally.
Also I would like to give my users a 10 day free trial of all the paid packages upon signing up. How would I implement this in code. I have my application set up and is functioning as though all users were administrators i.e no holds on anything and would now want to build in teh restrictions to monetise but am a bit lost on the work flow and the code implementation and data design to do this.
Reminds me are there any online services or open source applications that I can use to plug in to my application and handle this aspect of the site for me?
UPDATE =========================
Very comprehensive answers, however on a development level - what should I store in my database and how would I design the tables required. I understand not that each month for a monthly subscription a postback would be made to a url I would provide the gateway. Like what would be the bare essentials here for the database.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
嗯,你问了两个问题。
您正在寻找的是定期付款,大多数支付网关都提供此类选项(Paypal 提供)。基本上,它将信用卡信息存储在安全的数据库中,并每天运行 cron 来检查重复配置文件并请求授权。然而,实际上我不建议你自己做,这很困难,而且在大多数国家/地区都是非法的。 (您不能自己存储 CC 号码)。
有些网站会向您收取一次n个月的费用,但从用户的角度来看,它可能会吓到他们。
Zend Framework 附带了一个组件 (
Zend_Acl
)这将帮助您构建访问控制列表。您可以做的是为每种订阅类型创建一个“角色”,每个角色对不同的资源具有不同的权限。
如果您知道 MoSCOW 方法,它在某种程度上是相似的:(
请
注意,大多数时候,存在一种权限升级,因为如何您可以继承角色。
你需要隔离并找到你的资源,资源可以是你想要的任何东西,甚至是动态的和即时创建的。
使用断言,您应该能够限制每个角色的工作空间数量。
它给了你这个想法。
请注意,我从未使用过用户、控制器等术语,您实际上需要考虑角色、资源、特权。
您需要以简单的多对一关系存储角色及其关联帐户。
每个帐户可以有一个角色。付款停止后如何更新?视情况而定,但在大多数情况下,您需要运行一个 cron 来检查是否结束订阅并检查定期付款,具体取决于支付网关,它会回发结果交易,或直接通过网络服务返回。如果付款失败或被拒绝,您可以将角色改回免费帐户。
有多种方法可以做到这一点,这取决于您的应用程序和要求。
您可能想要存储每个月的订阅,或更新链接的帐户/订阅行。
Well, you're asking two questions.
What you are looking for is recurring payment, most payment gateway provides such options (Paypal does). Basically, it stores credit card information in a secure database, and run a cron every day to check for recurring profile and ask for authorization. However, I actually don't advise you to do it yourself, it's difficult, and somehow illegal in most country. (You can't store CC numbers yourself).
Some website will charge you once for n months, but in a user perspective point of view it can afraid them.
Zend Framework ships a component (
Zend_Acl
) which will help you to build an Access Control List.What you can do is created one "role" per subscription type, each with different privileges on different resources.
If you know the MoSCOW method, it is somehow similar:
etc.
Note, that most of the time, there is a kind of Privilege Escalation, because on how you can inherit roles.
You need to isolate, and find what your resource, resources can be anything you want, and even be dynamic and created on the fly.
Using assertions, you should be able to limit the number of workspace per role.
It gives you the idea.
Note, that I never used the term user, controller, etc., you actually need to think in terms of Role, Resource, Privilege.
You need to store the role, with its associated account in a simple many-to-one relationship.
Each account can have one role. How to update this when the payment stop? Depends, but in most case you'll need to run a cron which will check for ending subscription and check for recurring payment, depending on the payment gateway, it'll either postback the resulting transaction, or return it directly with the webservice. If the payment failed or is refused, then you can change back the role to a free account.
There are several way to do that, it depends on your application and requirements.
You may want to store each monthly subscription, or update a linked account/subscription row.
大多数支付网关将为您管理您的订阅并通过回发机制通知您的网站。即,
当订阅发生变化(即重新计费、取消、退款)时,您的支付网关会启动另一个回发,让您知道新事件。然后,您的应用程序将负责适当更新用户状态。
这是非常笼统的信息,尽管它是大多数支付网关遵循的大致步骤。
Most payment gateways will manage your subscriptions for you and notify your site via postback mechanism. I.e.,
When a a change in subscription occurs, i.e., rebill, cancel, chargeback, your payment gateway initiates another postback to let you know of a new event. Your application would then be responsible for updating the user status appropriately.
This is pretty general information, although it is roughly the steps most payment gateways follow.