A Django app for Stripe
Project description
Django + Stripe for Humans
Documentation
The full documentation is at http://dj-stripe.rtfd.org.
Quickstart
Install dj-stripe:
pip install dj-stripe
Add djstripe to your INSTALLED_APPS:
INSTALLED_APPS +=(
"djstripe",
)
Add the context processor to your TEMPLATE_CONTEXT_PROCESSORS:
TEMPLATE_CONTEXT_PROCESSORS +=(
'djstripe.context_processors.djstripe_settings',
)
Add your stripe keys:
STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "<your publishable test key>")
STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "<your secret test key>")
Add some payment plans:
DJSTRIPE_PLANS = {
"monthly": {
"stripe_plan_id": "pro-monthly",
"name": "Web App Pro ($24.99/month)",
"description": "The monthly subscription plan to WebApp",
"price": 24.99, # $24.99
"currency": "usd",
"interval": "month"
},
"yearly": {
"stripe_plan_id": "pro-yearly",
"name": "Web App Pro ($199/year)",
"description": "The annual subscription plan to WebApp",
"price": 19900, # $19900
"currency": "usd",
"interval": "year"
}
}
Add to the urls.py:
url(r'^payments/', include('djstripe.urls', namespace="djstripe")),
Run the commands:
python manage.py syncdb python manage.py djstripe_init_customers python manage.py djstripe_init_plans
Start up the webserver:
Running Tests
pip install -r requirements_text.txt python runtests.py
Features
Subscription management
Works with Django 1.5, 1.4
Works with Python 3.3, 2.7, 2.6
Dead-Easy installation (Done, just needs documentation)
Single-unit purchases (forthcoming)
History
0.1.5 (2013-08-08)
Fixed the manifest so we include html, css, js, images.
0.1.4 (2013-08-08)
Change PaymentRequiredMixin to SubscriptionPaymentRequiredMixin
Add subscription_payment_required function-based view decorator
Added SubscriptionPaymentRedirectMiddleware
Much nicer accounts view display
Much improved subscription form display
Payment plans can have decimals
Payment plans can have custom images
0.1.3 (2013-08-7)
Added account view
Added Customer.get_or_create method
Added djstripe_sync_customers management command
sync file for all code that keeps things in sync with stripe
Use client-side JavaScript to get history data asynchronously
More user friendly action views
0.1.2 (2013-08-6)
Admin working
Better publish statement
Fix dependencies
0.1.1 (2013-08-6)
Ported internals from django-stripe-payments
Began writing the views
Travis-CI
All tests passing on Python 2.7 and 3.3
All tests passing on Django 1.4 and 1.5
Began model cleanup
Better form
Provide better response from management commands
0.1.0 (2013-08-5)
First release on PyPI.
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
File details
Details for the file dj-stripe-0.1.5.tar.gz
.
File metadata
- Download URL: dj-stripe-0.1.5.tar.gz
- Upload date:
- Size: 26.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e2991b1c1bd8cc095ae3093ae29ae7d65cbab78efebd23ca9b806d9066eb432 |
|
MD5 | 7166f1d2380f3a9c6c8e3f29083d4258 |
|
BLAKE2b-256 | 39c06d56c966c1691b6d819b8ed4bd633493909a184b052c2d0f5a65c151842a |