django-paypal2 1.0.2

Creator: codyrutscher

Last updated:

Add to Cart

Description:

djangopaypal2 1.0.2

提供paypal支付相关的view和方法

Quick start

Install:
pip install django_paypal2

Add “paypal” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'paypal',
]

Add paypal config to settings.py:
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
}

Include the polls URLconf in your project urls.py like this:
url(r'^paypal/', include('paypal.urls')),

Migrate db
Create payment and redirect to paypal
from paypal.models import PaypalPayment

pp = PaypalPayment(description="sample pay")
pp.add_item("sample", 'USD', float(amount))
pp.reference_id = "your reference id"
pp.save()
return redirect('paypal_redirect', uid=pp.uid)

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.