Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updating README and fixing bad docstring in validate_webhook

  • Loading branch information...
commit a0cd4a26288defd60190734edd0908dca8cd7cc7 1 parent b2acb62
alexjg authored
29  README.rst
Source Rendered
@@ -5,16 +5,33 @@ The GoCardless Python Client Library
5 5
 
6 6
 This module provides a wrapper around the GoCardless payments API, the
7 7
 interface to the api is provided by the `gocardless.Client` object. See the
8  
-documentation for that class for how to obtain a reference.
  8
+documentation for that class for how to obtain an instance.
9 9
 
10 10
 By default the library will attempt to use the GoCardless production
11 11
 environment, for testing purposes this is not what you want and you should set
12  
-the `gocardless.environment` to "sandbox".
  12
+the `gocardless.environment` to "sandbox".::
13 13
 
14  
-Once you have obtained an instance of a client you can use that client to
15  
-generate urls for receiving payments. You can also use it to query the api for
16  
-information about payments resources using an active resource style API. For
17  
-example, to get all of a merchants bills::
  14
+    >>> gocardless.environment = "sandbox"
  15
+
  16
+Set your account details:::
  17
+    
  18
+    >>> details = {
  19
+    >>>     "app_id":"kzCOPw2JtJvRQxKTlFqQTGvxLvkoMS1Eb0Dgl5QVc1W0NKpOEZDvESfGOI_kkG2l",
  20
+    >>>     "app_secret":"IO9AlgPsbYNCtFlciV_HOBrGB3Mi07PFYSn2zx4uK5xaWJI1AzwnYeC86x46ji_g",
  21
+    >>>     "token":"5EFkzOrUOZ8t+iaP86NggIy+iKGJ0f7QMnMd+Q3P4mQk17Kzq9G1vYrNlEWFldlg",
  22
+    >>>     "merchant_id":"5EFkzOrUOZ8t+iaP86NggIy+iKGJ0f7QMnMd+Q3P4mQk17Kzq9G1vYrNlEWFldlg"
  23
+    >>> }
  24
+    >>> gocardless.set_details(details)
  25
+
  26
+You can now use the `gocardless.client` object to generate urls for receiving payments.::
  27
+
  28
+    >>> gocardless.client.new_bill_url(10)
  29
+
  30
+Users who click on this link will be taken to the GoCardless website to make a payment to 
  31
+your account.
  32
+
  33
+You can also use it to query the api for information about payments resources using an 
  34
+active resource style API. For example, to get all of a merchants bills::
18 35
 
19 36
     >>> merchant = client.merchant()
20 37
     >>> merchant.bills()
2  gocardless/client.py
@@ -386,7 +386,7 @@ def validate_webhook(self, params):
386 386
         valid.
387 387
 
388 388
         :param params: A dictionary of data to validate, must include
389  
-        the key "signature"
  389
+          the key "signature"
390 390
         """
391 391
         utils.signature_valid(params, self._app_secret)
392 392
 

0 notes on commit a0cd4a2

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