Git Product home page Git Product logo

cmft-stripe-integration's Introduction

dj-stripe

Django + Stripe Made Easy

Badges

https://img.shields.io/travis/dj-stripe/dj-stripe.svg?style=flat-square https://img.shields.io/codecov/c/github/dj-stripe/dj-stripe.svg?style=flat-square https://img.shields.io/codacy/grade/3c99e13eda1c4dea9f993b362e4ea816.svg?style=flat-square https://img.shields.io/pypi/v/dj-stripe.svg?style=flat-square https://img.shields.io/pypi/dw/dj-stripe.svg?style=flat-square https://img.shields.io/github/issues/dj-stripe/dj-stripe.svg?style=flat-square https://img.shields.io/github/license/dj-stripe/dj-stripe.svg?style=flat-square

Documentation

The full documentation is at http://dj-stripe.rtfd.org.

Features

  • Subscription management
  • Designed for easy implementation of post-registration subscription forms
  • Single-unit purchases
  • Works with Django >= 1.11
  • Works with Python 3.6, 3.5, 3.4, 2.7
  • Compatible with Stripe API version 2018-05-21
  • Built-in migrations
  • Dead-Easy installation
  • Leverages the best of the 3rd party Django package ecosystem
  • djstripe namespace so you can have more than one payments related app
  • Documented
  • 100% Tested

Constraints

  1. For stripe.com only
  2. Only use or support well-maintained third-party libraries
  3. For modern Python and Django

Quickstart

Install dj-stripe:

pip install dj-stripe

Add djstripe to your INSTALLED_APPS:

INSTALLED_APPS =(
    ...
    "djstripe",
    ...
)

Add your Stripe keys and set the operating mode:

STRIPE_LIVE_PUBLIC_KEY = os.environ.get("STRIPE_LIVE_PUBLIC_KEY", "<your publishable key>")
STRIPE_LIVE_SECRET_KEY = os.environ.get("STRIPE_LIVE_SECRET_KEY", "<your secret key>")
STRIPE_TEST_PUBLIC_KEY = os.environ.get("STRIPE_TEST_PUBLIC_KEY", "<your publishable key>")
STRIPE_TEST_SECRET_KEY = os.environ.get("STRIPE_TEST_SECRET_KEY", "<your secret key>")
STRIPE_LIVE_MODE = <True or False>

Add some payment plans via the Stripe.com dashboard or the django ORM.

Add to the urls.py:

url(r'^payments/', include('djstripe.urls', namespace="djstripe")),

Then tell Stripe about the webhook (Stripe webhook docs can be found here) using the full URL of your endpoint from the urls.py step above (e.g. https://yourwebsite.com/payments/webhook).

Run the commands:

python manage.py migrate

python manage.py djstripe_init_customers

Running the Tests

Assuming the tests are run against PostgreSQL:

createdb djstripe
pip install tox
tox

Follows Best Practices

This project follows best practices as espoused in Two Scoops of Django: Best Practices for Django 1.11.

cmft-stripe-integration's People

Contributors

smiteshz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.