davmixcool / coinpayments
A PHP wrapper for CoinPayments.net Api.
0.8.1
2018-11-23 23:17 UTC
Requires
- php: >=5.5.0
This package is auto-updated.
Last update: 2024-10-24 13:20:13 UTC
README
A PHP wrapper for CoinPayments.net Api. For account instructions visit: online API documentation to learn how to setup your API Keys and get a link to your account API Keys page.
Requirements
- PHP 5.5 and above
Steps:
Installation
Composer
Run the following command to include this package via Composer
composer require davmixcool/coinpayments
Usage
The simplest example is retrieving basic account information.
use Davmixcool\CoinPayments; /** Scenario: Retrieve basic user account information.**/ try { $cps_api = new CoinPayments($private_key, $public_key, 'json'); $information = $cps_api->GetBasicInfo(); } catch (Exception $e) { echo 'Error: ' . $e->getMessage(); exit(); } // Check for success of API call if ($cps_api['error'] == 'ok') { // Prepare output } else { // Throw an error if both API calls were not successful }
See examples here. for detailed scenarios.
Maintainers
This package is maintained by David Oti and you!
License
This package is licensed under the MIT license.