Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 54 lines (36 sloc) 1.846 kb
5775432c » hmarr
2012-05-01 Add license, ReST readme, setup.py
1 .. image:: https://gocardless.com/resources/logo.png
2
3 The GoCardless Python Client Library
4 ====================================
5
6 This module provides a wrapper around the GoCardless payments API, the
7 interface to the api is provided by the `gocardless.Client` object. See the
a0cd4a26 » alexjg
2012-05-01 Updating README and fixing bad docstring in validate_webhook
8 documentation for that class for how to obtain an instance.
5775432c » hmarr
2012-05-01 Add license, ReST readme, setup.py
9
10 By default the library will attempt to use the GoCardless production
11 environment, for testing purposes this is not what you want and you should set
a0cd4a26 » alexjg
2012-05-01 Updating README and fixing bad docstring in validate_webhook
12 the `gocardless.environment` to "sandbox".::
5775432c » hmarr
2012-05-01 Add license, ReST readme, setup.py
13
a0cd4a26 » alexjg
2012-05-01 Updating README and fixing bad docstring in validate_webhook
14 >>> gocardless.environment = "sandbox"
15
16 Set your account details:::
17
5d1b6fa8 » alexjg
2012-05-03 set_details now uses keyword arguments
18 >>> gocardless.set_details(app_id="kzCOPw2JtJvRQxKOPEREQTGvxLvkoMS1Eb0Dgl5QVc1W0NKpOEZDvESfGOI_kkG2l",
19 >>> app_secret="IO9AlgPsbYNCtFlcOFGROBrGB3Mi07PFYSn2zx4uK5xaWJI1AzwnYeC86x46ji_g",
20 >>> access_token="5EFkzOrUOZ8t+iaP86NggIy+FOFSD0f7QMnMd+Q3P4mQk17Kzq9G1vYrNlEWFldlg",
21 >>> merchant_id="02FX1YFDAS")
a0cd4a26 » alexjg
2012-05-01 Updating README and fixing bad docstring in validate_webhook
22
23 You can now use the `gocardless.client` object to generate urls for receiving payments.::
24
25 >>> gocardless.client.new_bill_url(10)
26
27 Users who click on this link will be taken to the GoCardless website to make a payment to
28 your account.
29
30 You can also use it to query the api for information about payments resources using an
31 active resource style API. For example, to get all of a merchants bills::
5775432c » hmarr
2012-05-01 Add license, ReST readme, setup.py
32
33 >>> merchant = client.merchant()
34 >>> merchant.bills()
35 >>> [<gocardless.resources.Bill at 0x29a6050>]
36
ae7cab3d » codeinthehole
2012-05-02 Added support for running the test suite using nose.
37 Contribute
38 ==========
39
40 Fork the repo then clone it to your machine and install in "develop" mode
41 (preferably using a virtualenv)::
42
43 mkvirtualenv gocardless
44 git clone https://github.com/<username>/gocardless-python
45 cd gocardless-python
46 python setup.py develop
47
48 Install the testing dependencies::
49
50 pip install -r requirements.txt
51
52 and run the test suite::
53
54 nosetests
Something went wrong with that request. Please try again.