Permalink
Browse files

Updating README and fixing bad docstring in validate_webhook

  • Loading branch information...
1 parent b2acb62 commit a0cd4a26288defd60190734edd0908dca8cd7cc7 @alexjg alexjg committed May 1, 2012
Showing with 24 additions and 7 deletions.
  1. +23 −6 README.rst
  2. +1 −1 gocardless/client.py
View
29 README.rst
@@ -5,16 +5,33 @@ The GoCardless Python Client Library
This module provides a wrapper around the GoCardless payments API, the
interface to the api is provided by the `gocardless.Client` object. See the
-documentation for that class for how to obtain a reference.
+documentation for that class for how to obtain an instance.
By default the library will attempt to use the GoCardless production
environment, for testing purposes this is not what you want and you should set
-the `gocardless.environment` to "sandbox".
+the `gocardless.environment` to "sandbox".::
-Once you have obtained an instance of a client you can use that client to
-generate urls for receiving payments. You can also use it to query the api for
-information about payments resources using an active resource style API. For
-example, to get all of a merchants bills::
+ >>> gocardless.environment = "sandbox"
+
+Set your account details:::
+
+ >>> details = {
+ >>> "app_id":"kzCOPw2JtJvRQxKTlFqQTGvxLvkoMS1Eb0Dgl5QVc1W0NKpOEZDvESfGOI_kkG2l",
+ >>> "app_secret":"IO9AlgPsbYNCtFlciV_HOBrGB3Mi07PFYSn2zx4uK5xaWJI1AzwnYeC86x46ji_g",
+ >>> "token":"5EFkzOrUOZ8t+iaP86NggIy+iKGJ0f7QMnMd+Q3P4mQk17Kzq9G1vYrNlEWFldlg",
+ >>> "merchant_id":"5EFkzOrUOZ8t+iaP86NggIy+iKGJ0f7QMnMd+Q3P4mQk17Kzq9G1vYrNlEWFldlg"
+ >>> }
+ >>> gocardless.set_details(details)
+
+You can now use the `gocardless.client` object to generate urls for receiving payments.::
+
+ >>> gocardless.client.new_bill_url(10)
+
+Users who click on this link will be taken to the GoCardless website to make a payment to
+your account.
+
+You can also use it to query the api for information about payments resources using an
+active resource style API. For example, to get all of a merchants bills::
>>> merchant = client.merchant()
>>> merchant.bills()
View
2 gocardless/client.py
@@ -386,7 +386,7 @@ def validate_webhook(self, params):
valid.
:param params: A dictionary of data to validate, must include
- the key "signature"
+ the key "signature"
"""
utils.signature_valid(params, self._app_secret)

0 comments on commit a0cd4a2

Please sign in to comment.