paypal for django
Project description
提供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 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" tx.save() return redirect('paypal_redirect', uid=tx.uid)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-paypal2-0.4.4.tar.gz
(10.8 kB
view hashes)