Download the PHP package covery/client without Composer

On this page you can find all versions of the php package covery/client. 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 client

Covery Client

Latest Stable Version Build Status Code Quality PHP Version

Official PHP Covery Client

How to Start

  1. You need to acquire an access token and a secret
  2. Install a client using composer: composer require "covery/client=^1.0.0"

Basic Integration

The first thing you need is to initialize Facade with credentials and transport. To do this, place the following code somewhere close to your application initialization:

Optional (use only for debug):

That's all!

Having completed this procedure, you can now query Covery using Facade::sendEvent, Facade::sendPostback, Facade::makeDecision.

Login event example:

Postback event example:

KycProof event example:

Card Id event example:

Document Storage event example:

Attach document connection event example:

Detach document connection event example:

Document file upload example:

Account Configuration Status event example:

Tech Details

Facade

Covery\Client\Facade is a static wrapper over Covery\Client\PublicAPIClient. If you use dependency injection or other application assembly mechanism, you may prefer not to use Facade, and rather use the client directly.

PSR-3, PSR-4 and PSR7

  1. Covery client supports PSR-3 loggers. You may assign them to Facade calling Facade::setLogger or to PublicAPIClient passing a logger as a constructor argument.
  2. Covery client code uses PSR-4 autoloader. Just require /vendor/autoload.php.
  3. HTTP communication uses PSR-7 HTTP message, so you may extend the client's capabilities as you see fit.

Transports

Covery client may use any class that satisfies Covery\Client\TransportInterface to send requests. Covery client ships with two major implementations:

  1. Covery\Client\Transport\Curl - simple PHP curl implementation
  2. Covery\Client\Transport\OverGuzzle - adapter over Guzzle HTTP client

Envelopes

Methods sendEvent and makeDecision require envelope as argument. Envelope is a pack of following data:

Envelope specifications are bundled in Covery\Client\EnvelopeInterface.

You may provide the following as envelopes:

  1. Own implementations of EnvelopeInterface. For example, your own payment order model may be extended to implement EnvelopeInterface, then you may pass it to sendEvent and/or makeDecision directly.
  2. Custom-built Covery\Client\Envelopes\Envelope
  3. Envelopes built using Covery\Client\Envelopes\Builder (don't forget to invoke build()!)

Results

  1. sendEvent will return integer (may be x64) containing ID of a stored entity on Covery side. You should log it.
  2. makeDecision will return Covery\Client\Result object:
    • Call getScore() to obtain score in range [-100, 100]
    • Method isAccept() will return true if Covery did not found fraud in incoming envelope data
    • Method isReject() will return true if Covery found fraud in incoming envelope data

Exception Tree

Error loggers

Changelog


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
psr/http-message Version 2.0
psr/log Version 1.1.4
guzzlehttp/psr7 Version 2.7.0
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 covery/client contains the following files

Loading the files please wait ....