开发者

How do I enable monthly fee on my webapp? (GAE two interfaces)

I have an App Engine web application (based on python) in which one I would like to offer a "Free" Version and a "Premium" one. I would like to charge a monthly fee to the users that want to use the Premium version of the app, blocking access to premium features to the free users, just as Grooveshark does.

Which is the best way to do this when you're using Google App Engine for developing? I mean, I know that Paypal let you to charge a monthly fee to users but, How can I restrict access between the two interfaces? I'm really lost in this field, Never made a "Paid Model Ap开发者_如何学Gop" before.


Authorization determines what your users are allowed to do in your application based on their roles/permissions.
Basically you would need the following things:

  1. A flag membership status that indicates if a user is Premium or not; this should be set after the payment
  2. A @is_premium decorator to check if, reading the membership flag value , a given Web Handler can be called by the current user

Have a look to Web2py authorization, Django Auth or Tipfy acl extension for some pretty neat solutions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜