The GoCardless PHP client provides a simple PHP interface to the GoCardless API.
The following links may be useful:
- Developer overview of GoCardless
- Documentation and tutorial for individual merchants
- Documentation for partners (multiple merchants)
- Our introductory guide to using the PHP library
- Some more advanced PHP library usage
- Our quick guide to handling exceptions with the library
- Code samples
- Our CodeIgniter plugin and spark
- You can also use GoCardless via the PHP Payments library and CodeIgniter Payments spark
- Full library reference
- Our developer support IRC chat room
Since 0.4.0, the default environment for the library is sandbox, not production.
To make your code work for production use, you'll then need to explicitly set the environment to production. Simply add this line of code before the call to GoCardless::set_account_details:
GoCardless::$environment = 'production';The files you need to use the GoCardless API are in the /lib folder.
$ git clone git://github.com/gocardless/gocardless-php.git$ curl -L https://github.com/downloads/gocardless/gocardless-php/gocardless-php-v0.4.1.tgz | tar xzvClick here to download the zip file.
Add gocardless/gocardless to the contents of your composer.json:
{
"require": {
"gocardless/gocardless": ">=0.4.1"
}
}
