Skip to content

stano/django-paypal-adaptive

 
 

Repository files navigation

Django Paypal Adaptive

Build Status Downloads

The API and the modules in this repository might be subject to smaller changes and not all Paypal Adaptive endpoints are covered. FundedByMe will help make the covering of the Pay, Preapproval and IPN endpoints as good as possible but we might not have the resources to perfect this project.

Making Preapprovals and using them to create Payments is fully supported together with Paypal's IPN push API. Please reach out to us if you're interested in helping maintaining this package.

Installation

Install package from PyPI:

pip install django-paypal-adaptive

Add to your project's INSTALLED_APPS setting:

INSTALLED_APPS = (
    …
    'paypaladaptive',
)

Sync the database:

$ python manage.py syncdb

Or if you're using South you might want to add an initial migration for future changes:

$ python manage.py schemamigration paypaladaptive --initial
$ python manage.py syncdb --migrate

Models

Payment

Status

Possible values are:

'new'  # Payment only exists locally
'created'  # Payment exists on Paypal
'error'  # Something along the process has gone wrong. Check status_detail
         # for more info.
'returned'  # User has returned via the Payment return_url
'completed'  # The Payment is complete
'refunded'  # The Payment is refunded
'canceled'  # The Payment has been canceled

Preapproval

Status

Possible values are:

'new'  # Preapproval only exists locally — not known to Paypal
'created'  # Preapproval has been saved on Paypal
'error'  # Something has gone wrong, check status_detail for more info
'returned'  # User has returned via the Preapproval return_url
'approved'  # Preapproval is completed — ready to be used in payment
'canceled'  # Preapproval has been canceled
'used'  # Preapproval has been used in payment

The status describes

Settings

TEST_WITH_MOCK

Set whether tests should be run with built-in mocking responses and requests or if the testing should spawn requests that hits Paypal's APIs directly. Defaults to True. Override in your settings file like this:

PAYPAL_TEST_WITH_MOCK = False

License

Creative Commons-licens
django-paypal-adaptive av FundedByMe är licensierad under en Creative Commons Erkännande 3.0 Unported licens.
Based on a work at https://github.com/gmcguire/django-paypal-adaptive.

About

Paypal Adaptive API support for Django

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%