How to "start" the Paypal subscription service in the Google App Engine?

First of all, I want you to know that I am a complete newbie in these things about developing “paid” webapps. I read several posts on how to integrate Paypal IPN with Google App Engine, and I have some questions about the topic, the point is this:

I want to use the Paypal Subscribe button in my webapp (which is developed with the GAE Python base) so users can subscribe to the premium version if they no longer want to use the free ...

I read that paypal can help me manage this thing about managing users via IPN, but I have to configure this in my GAE application, and I don't know how ... For example:

Where should the notification URL point to the PayPal profile configuration? I believe that it should point to a python script in my application, but I'm not sure ... If it is true, what should this python script have?

Then, after that, how can I make paypal create usernames and passwords for my users so as not to use premium users from the “premium features”? I don’t need links to something, I need explanations on how to implement the “Paypal subscription service” inside the Python-based application in GAE in order to offer a “premium service” and free,

Thanks, hope you can help

+4
source share
1 answer

To make a short answer (since I'm not quite sure what your question area is).

  • This is not paypal to support your data model. You need to create a database record with your users.

As an example, google documentation on

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 can create, for example, such a data model:

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

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

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

  • Yes, a PayPal instant payment notification will call your application (you can specify somewhere in the Paypal interface what uri is, so you can choose what to display it, preferably using your https appspot subdomain). Your application will need to store what Paypal just sent, and before you formalize something, call the Paypal servers back with the parameters that were sent to see if Paypal really made the first one, and not someone else .

To see a working example of this, check out 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 of these examples suck (it will probably work, but will not use them as in the production process, since you will end up with poor error management).

+6
source

Source: https://habr.com/ru/post/1338344/


All Articles