Skip to content
Browse files

added docs for stripe gateway

  • Loading branch information...
1 parent be0d3dd commit 1f2a8189a75b963877895925473feffeef5e289b @hayyat committed Dec 27, 2011
Showing with 54 additions and 0 deletions.
  1. +54 −0 docs/gateways/stripe_payment.rst
View
54 docs/gateways/stripe_payment.rst
@@ -0,0 +1,54 @@
+-----------------------------------
+Stripe Payments
+-----------------------------------
+
+`Stripe Payments`_ is a gateway provided by `Stripe`_
+to services which are willing to take the burden of PCI compliance. This does not involve
+any redirects and only Server to Server calls happen in the background.
+
+.. note::
+
+ You will require the official `stripe`_ python package offered by Stripe
+ for this gateway to work.
+
+Settings attributes required for this integration are:
+
+* ``STRIPE_API_KEY``: The merchant api key is provided by Stripe.
+ Can be obtained from the account dashboard.
+
+
+Example:
+---------
+
+ Simple usage::
+
+ >>> stripe = get_gateway("stripe")
+ >>> credit_card = CreditCard(first_name="Test", last_name="User",
+ month=10, year=2012,
+ number="4242424242424242",
+ verification_value="100")
+
+ # Bill the user for 1000 USD
+ >>> resp = stripe.purchase(1000, credit_card)
+ >>> resp["response"].is_success
+ True
+
+ # Store Customer and Credit Card information in the vault
+ >>> resp = stripe.store(credit_card)
+
+ # Unstore a previously stored credit card from the vault
+ >>> response = stripe.unstore(resp["response"].id)
+ >>> response["response"].is_success
+ True
+
+ # A recurring plan charge
+ >>> options = {"plan_id": "gold"}
+ >>> resp = stripe.recurring(credit_card, options = options)
+ >>> resp["response"].is_success
+ True
+
+
+
+.. _`Stripe Payments Docs`: https://stripe.com/docs
+.. _`Stripe Payments`: https://stripe.com/
+.. _`stripe`: http://pypi.python.org/pypi/stripe/

0 comments on commit 1f2a818

Please sign in to comment.
Something went wrong with that request. Please try again.