Download the PHP package coinbase/coinbase-commerce without Composer
On this page you can find all versions of the php package coinbase/coinbase-commerce. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
All versions of coinbase-commerce with dependencies
Informations about the package coinbase-commerce
Note: This repository is not actively maintained.
The official PHP library for the Coinbase Commerce API.
Table of contents
- PHP Versions
- Testing and Contributing
PHP version 5.4 and above are supported.
For more details visit Coinbase API docs.
To start using this library register an account on Coinbase Commerce.
You will find your
API_KEY from User Settings.
Next initialize a
Client for interacting with the API. The only required parameter to initialize a client is
apiKey, however, you can also pass in
Parameters can be also be set post-initialization:
Disable SSL Check
The API resource class provides the following static methods:
list, all, create, retrieve, updateById, deleteById. Additionally, the API resource class also provides the following instance methods:
save, delete, insert, update.
Each API method returns an
ApiResource which represents the JSON response from the API.
When the response data is parsed into objects, the appropriate
ApiResource subclass will automatically be used.
Client supports the handling of common API errors and warnings. All errors that occur during any interaction with the API will be raised as exceptions.
Checkouts API docs
More examples on how to use checkouts can be found in the
Load checkout resource class
List method returns ApiResourceList object.
Get all checkouts
Charges API docs
More examples on how to use charges can be found in the
Load charge resource class
Get all charges
Resolve a charge
Resolve a charge that has been previously marked as unresolved.
Cancel a charge
Cancels a charge that has been previously created. Note: Only new charges can be successfully canceled. Once payment is detected, charge can no longer be canceled.
Events API Docs
More examples on how to use events can be found in the
Load event resource class
Get all events
It's prudent to be conscious of warnings. The library will log all warnings to a standard PSR-3 logger if one is configured.
Coinbase Commerce signs the webhook events it sends to your endpoint, allowing you to validate and verify that they weren't sent by someone else.
You can find a simple example of how to use this with Express in the
Verify Signature header
Testing and Contributing
Any and all contributions are welcome! The process is simple: fork this repo, make your changes, run the test suite, and submit a pull request. To run the tests, clone the repository and run the following commands: