Releases: gocardless/gocardless-pro-php
Releases · gocardless/gocardless-pro-php
v1.0.0
- Add safe retrying for requests where possible:
- Automatically retry requests that fail due to network or GoCardless errors.
- Automatically add an idempotency key for POST requests if not provided.
- Breaking change: Automatically retrieve and return the existing resource in the event of a
409 idempotent_creation_conflict
response. This changes previous behaviour - instead of seeing an exception at this point, the client will now automatically retrieve the original resource that was created with that idempotency key.
v0.11.0
v0.10.1
v0.10.0
v0.9.4
v0.9.3
v0.9.2
Fixes
- Resolves an issue where package_path was being incorrectly generated
v0.9.1
This release uses the bundled certificate for making requests.
v0.9.0
This release brings us closer to a v1.0.0 release and brings the general interface of the client in line with the existing ruby and python clients.
Notable Changes:
Params
Query and request params as now nested under a params
key.
For example:
$customers = $client->customers()->list(['params' => ['limit' => 400]]);
Exceptions
We've renamed the exception classes:
GoCardlessError
->GoCardlessProException
InvalidApiUsageError
->InvalidApiUsageException
InvalidStateError
->InvalidStateException
ValidationFailedError
->ValidationFailedException
and altered the available api error methods slightly:
print_r($e->api_error)
/*
* stdClass Object
* (
* [message] => Payment cannot be cancelled
* [errors] => Array
* (
* [0] => stdClass Object
* (
* [reason] => cancellation_failed
* [message] => Payment cannot be cancelled
* )
*
* )
*
* [documentation_url] => https://developer.gocardless.com/pro#cancellation_failed
* [type] => invalid_state
* [request_id] => 262edcc8-8fdc-4b89-8040-c3d066cea430
* [code] => 422
* )
*/
$e->getType() // invalid_state
$e->getErrors() // Array of API errors
$e->getDocumentationUrl() // https://developer.gocardless.com/pro#cancellation_failed
$e->getRequestId() // 262edcc8-8fdc-4b89-8040-c3d066cea431
$e->getMessage() // Payment cannot be cancelled
$e->getCode() // 422
v0.3.1
Fix SSL issues and cancel endpoints