django-braintree
Installation
Install django_braintree (ideally in your virtualenv!) using pip or simply getting a copy of the code and putting it in a directory in your codebase.
pip install tivix-django-braintree
Add django_braintree to your Django settings INSTALLED_APPS:
INSTALLED_APPS = [ # ... "django_braintree", ]Add these lines in settings.py file:
BRAINTREE_MERCHANT = 'your_merchant_key' BRAINTREE_PUBLIC_KEY = 'your_public_key' BRAINTREE_PRIVATE_KEY = 'your_private_key' from braintree import Configuration, Environment Configuration.configure( Environment.Sandbox, BRAINTREE_MERCHANT, BRAINTREE_PUBLIC_KEY, BRAINTREE_PRIVATE_KEY )Add url to urls.py:
url(r'', include('django_braintree.urls')),If you’re using South for schema migrations run python manage.py migrate django_braintree or simply do a syncdb.
Additional Information
Braintree uses default templates:
django_braintree/payments_billing.html django_braintree/fragments/cc_form.html django_braintree/fragments/current_cc_info.html django_braintree/fragments/pay.html django_braintree/fragments/payments_billing.html
Braintree requires including the js from django_common that enables ajax forms etc. django_common is available at https://github.com/Tivix/django-common
If a template variable cc_form_post_url is passed to the template then this form posts to it, otherwise it posts to the url payments_billing.
If a template variable cc_form_success_redirect_url is passed it takes user to that url then after form post has succeeded.
Braintree is set up to sandbox mode at default. To change this you must switch Environment.Sandbox to Environment.Production in settings file.
Revision History
v0.1.2 Changed urls.py to be compatible with Django 1.4+
v0.1.3 Changed urls.py to be compatible with Django 1.5+
This opensource app is brought to you by Tivix, Inc. ( http://tivix.com/ )
Metadata
Release files for tivix-django-braintree 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tivix-django-braintree-0.1.3.tar.gz | 6.4 kB | Without provenance | Details for tivix-django-braintree-0.1.3.tar.gz |
Release files / tivix-django-braintree-0.1.3.tar.gz
| Download URL | tivix-django-braintree-0.1.3.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca5b97e08d353eff2dc5c10348a97ab49cf3927eb2c6fc659e5ab1672c2dbd32
|
|
BLAKE2b-256 checksum How to use checksums |
518faeb4ccb35dfbe9e9e2202e07f9546733c83ac852e72ffbdac864ac9a3b7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for tivix-django-braintree 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.