skip to navigation
skip to content

django-paypal2 0.4.0

paypal for django

Latest Version: 1.0.2


Quick start

  1. Install:

    pip install django_paypal2
  2. Add “paypal” to your INSTALLED_APPS setting like this:

  3. Add paypal config to

    PAYPAL = {
        "SERVER_URL": "http://localhost:8000", # current site host and port
        "sandbox": False,  # True or False
        "client_id": "xxx",
        "client_secret": "", # you can get id and secret from paypal
  4. Include the polls URLconf in your project like this:

    url(r'^paypal/', include('paypal.urls')),
  5. Migrate db

  6. Create transaction and redirect to paypal

    from paypal.models import PaypalTransaction
    tx = PaypalTransaction(description="sample pay")
    tx.add_item("sample", 'USD', float(amount))
    tx.reference_id = "your reference id"
    return redirect('paypal_redirect', uid=tx.uid)
File Type Py Version Uploaded on Size
django-paypal2-0.4.0.tar.gz (md5) Source 2017-09-14 10KB