如何“跑”? “Paypal 订阅服务”在 Google App Engine 中?

发布于 2024-10-15 23:34:43 字数 532 浏览 7 评论 0原文

首先,我想让你知道我是一个完全的新手 关于开发“付费”网络应用程序的这些事情。我一直在阅读一些关于如何将 PayPal 的 IPN 与 Google App Engine 集成的文章,我对这个主题有一些疑问,事情是这样的:

我想在我的 web 应用程序中使用 PayPal 的订阅按钮(它是用 GAE 的 Python 开发的)根据) 因此,如果用户不想再使用免费版本,可以订阅高级版本...

我读到 PayPal 可以帮助我通过 IPN 管理有关用户控制的事情,但我必须在我的GAE 应用程序,我不知道如何...例如:

通知 URL 必须指向 PayPal 的配置文件配置中的位置? 我相信它必须指向我的应用程序中的 Python 脚本,但我不确定...如果这是真的,这个 Python 脚本必须有什么?

然后,完成后,我怎样才能让PayPal创建 我的用户的用户名和密码,以防止非高级用户使用“高级功能”?我不想链接到某些东西,我需要解释如何在 GAE 上基于 Python 的应用程序中实现“PayPal 订阅服务”,以便提供“高级服务”和免费服务,

谢谢,希望您能提供帮助

before anything, I want to you to Know that I'm a Complete Newbie
in these things about developing "paid" webapps. I have been reading some posts about how to integrate PayPal's IPN with Google App Engine, and I have some questions about the topic, the thing is like this:

I want to use a PayPal's Subscribe button in my webapp (which is developed with GAE's Python base)
so the users can subscribe to the premium version if they don't want to use the free one anymore...

I was reading that PayPal can help me to manage this thing about the users control via IPN but I have to setup that in my GAE App and I don't know how... For example:

Where the notification URL has to point to in PayPal's profile configuration?
I believe it has to point to a Python script in my app but I'm not sure... If that is true, What does this Python script has to have?

Then, after that's finished, How can I make PayPal create
usernames and passwords for my users in order to keep non premium users out of the "premium features"?? I don't want links to something, I need explanations on how to implement a "PayPal Subscriptions service" inside a Python based app on GAE in order to offer a "premium service" and a free one,

Thanks, hope you can help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

五里雾 2024-10-22 23:34:43

做一个简短的回答(因为我不太确定你的问题的范围是什么)。

  1. 维护您的数据模型不是 PayPal 的工作。您需要与您的用户创建一个数据库条目。

有关示例,请参阅 Google 文档:

http://code.google .com/appengine/docs/python/gettingstarted/usingusers.html
更重要的是,http://code.google.com/appengine/ docs/python/gettingstarted/usingdatastore.html

所以你可以创建,例如,这种类型的数据模型:(

class Users(db.Model):
  gae_user_object = db.UserProperty()
  premium_member = db.BooleanProperty(default=False)

当然,因为你想跟踪订阅,这太有限了,但你可以明白)。

并使Paypal调用的脚本触发一个函数来更改*premium_member*的值...

  1. 是的,paypal即时付款通知将调用您的应用程序(您可以在Paypal界面中的某处指定什么uri,这样您就可以选择映射它到,最好使用您的 https appspot 子域)。您的应用程序需要存储 Paypal 刚刚发送的内容,并且在正式执行任何操作之前,使用刚刚发送的参数调用 Paypal 服务器,以了解第一个消息是否真正由 Paypal 而不是其他人制作。

要查看其工作示例,请查看 http://blog.awarelabs.com /2008/paypal-ipn-python-code/http://groups.google.com/group/google-appengine-python/browse_thread/thread/d76701e774e308be,即使这两个示例都很糟糕(它可能会工作,但不要按原样使用它们生产,因为你最终会得到真正糟糕的错误管理)。

To make a short answer (as I'm not exactly sure what's the scope of your question).

  1. It's not paypal's job to maintain your data model. You need to create a database entry with your users.

For an example of that, look Google's documentation at

http://code.google.com/appengine/docs/python/gettingstarted/usingusers.html
and, more importantly, http://code.google.com/appengine/docs/python/gettingstarted/usingdatastore.html

So you could create, for example, data model of this sort:

class Users(db.Model):
  gae_user_object = db.UserProperty()
  premium_member = db.BooleanProperty(default=False)

(of course, since you want to track subscriptions, this would be way too limited but you can get the idea).

and make the script called by Paypal trigger a function to change the value of *premium_member*...

  1. Yes, paypal instant payment notification will call your app (you can specify somewhere in Paypal interface what uri, so you can choose what to map it to, preferably using your https appspot subdomain). Your app will need to store what paypal just sent and, before officializing anything, call Paypal servers back with the parameters that were just sent to know if the first was truly made by Paypal and not someone else.

To see a working example of that, check http://blog.awarelabs.com/2008/paypal-ipn-python-code/ and http://groups.google.com/group/google-appengine-python/browse_thread/thread/d76701e774e308be, even if both these example sucks (it will probably work, but don't use them as is in production as you'll notably end up with real bad error management).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文