Download the PHP package chibka/ccloud without Composer

On this page you can find all versions of the php package chibka/ccloud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ccloud

Build Status

Currencycloud API v2 PHP client

Version: 0.14.0

This is the official PHP SDK for the Currencycloud API. Additional documentation for each API endpoint can be found at developer.currencycloud.com.

If you have any queries or you require support, please contact our sales team at [email protected]. Please quote your login id in any correspondence as this makes it simpler for us to locate your account and give you the support you need.

Prerequisites

Composer (optional, but highly recommended)

CurrencyCloud-PHP is a Composer project. While using Composer is not strictly required, it will be far easier to simply make use of Composer to do the dependency management and autoloading for you.

Supported PHP version

This library aims to support and is tested against PHP 5.5 and greater.

Installation

The recommended way to install Currencycloud SDK is through Composer.

If you do not have composer installed check Composer installation guide.

Assuming you have composer installed globally you can require Currencycloud SDK into you project by executing:

After installing, you need to require Composer's autoloader if you did not require it before:

Usage

You can register for demo API key at developer.currencycloud.com.

An example in PHP 5.5:

For a slightly longer example, see Cookbook from the documentation.

Common Patterns

Reusing client for multiple requests

Authentication tokens are long-livedand are meant to be reused for multiple requests. This will improve performance of calls through the api.

On Behalf Of

If you want to make calls on behalf of another user (e.g. someone who is your end-client), you can execute certain commands 'on behalf of' the user's contact id. Here is an example:

Each of the above transactions will be executed in scope of the limits for that contact and linked to that contact. Note that the real user who executed the transaction will also be stored.

Errors

When an error occurs in the API, the library aims to give us much information as possible. A CurrencyCloudException will be thrown that contains much useful information that you can access via its methods. When the exception converted to string, it will provide information such as the following:

This is split into 5 sections:

  1. Error Type: In this case BadRequestException represents an HTTP 400 error
  2. Platform: The PHP implementation that was used in the client
  3. Request: Details about the HTTP request that was made, e.g. the POST parameters
  4. Response: Details about the HTTP response that was returned, e.g. HTTP status code
  5. Errors: A list of errors that provide additional information

The final section contains valuable information:

When troubleshooting API calls with Currencycloud support, including the full error in any correspondence can be very helpful.

Development

Testing

Test cases can be run with vendor/bin/phpunit.

Dependencies

Versioning

This project uses semantic versioning. You can safely express a dependency on a major version and expect all minor and patch versions to be backwards compatible.

Copyright

Copyright (c) 2018 Currencycloud. See LICENSE for details.


All versions of ccloud with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
guzzlehttp/guzzle Version ~6.1
symfony/yaml Version ~2.7
symfony/event-dispatcher Version ^2.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chibka/ccloud contains the following files

Loading the files please wait ....