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 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)
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-1.0.1.tar.gz
(11.0 kB
view details)
File details
Details for the file django-paypal2-1.0.1.tar.gz.
File metadata
- Download URL: django-paypal2-1.0.1.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8408949f7db872cbd2266e72ceedbe38efc4d9c26686a2faec20fc45098d1fd3
|
|
| MD5 |
59ead2bcbc071ad838e7ba143a9e4b89
|
|
| BLAKE2b-256 |
91e2d881343f4d96662bea80290c58d32aba3f2b8979f5953018ddede75606a5
|