Django registration with PayPal integration

I am trying to understand how to integrate django-registration with django-paypal. Being Django n00b, I am trying to figure out how to implement a stream as follows:

  • User subscribes using django-registation with the 'active' flag set to 0
  • After registration, send the user to PayPal to subscribe
  • When they return from PayPal successfully, I want to set "active" to 1

I looked at the django registration documentation and don't quite understand how to use different servers or implement the stream the way I want.

Any advice on how to do this would be greatly appreciated. django-paypal will not be a problem for me, as I already did PayPal integration before (in PHP for self-publishing of CakePHP).

+3
source share
1 answer

To prevent the registration from sending an email, you send send_email=Falsea call RegistrationManager.create_inactive_userin your submission to register the user. After creating the user, you probably want to create a landing page using the PayPal buttons for payment. Ask the user to click the payment button to pay. Usually I send user.idin the field customfor the payment button.

django-paypal IPN, user.id custom IPN. , , , , .

+4

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


All Articles