Download the PHP package cecula/vereafy without Composer

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

Vereafy PHP Library


Introduction

Vereafy is an SMS based 2-factor authentication services that uses machine learning to understand the causes of OTP delivery failures and resolves them instantly to ensure your login and sign up OTPs deliver.

Installation

The Vereafy PHP Library Project was created to enable PHP Developers integrate seamlessly with the Vereafy API.

To use the Vereafy PHP library, you just need to clone this repo into your existing project directory and require the Vereafy class file (Vereafy.php) or install with composer.

Installing with Composer

composer require cecula/vereafy

Installing from GitHub

git clone https://github.com/cecula-vereafy/php-library vereafy

Including Library in Project

If you installed the Vereafy Library using composer, use the following line to include project:

require_once "/path/to/vendor/autoload.php";

otherwise, if you cloned the GitHub repo you can simply require the project from the directory you save it to

require_once "/path/to/vereafy/Vereafy.php"

How to Get API Key

Your API Key is first generated when you register an app. To register an app, Login to the Developers Dashboard, Navigate to Apps > Add, Type the name of your app and click Submit. The app will be registered and a new API Key will be generated. Copy the API key into your project.

OR

Click developer.cecula.com to get started.

Initialization

The Vereafy 2FA initialization can be as simple as the following lines of code:

     $vereafyInstance = new Vereafy(<your_APIKEY>);
     $vereafyInstance->init(<your_MOBILE>);

The initialization method returns a response that should look like this:

         {
            "status":"success",
             "pinRef": "1293488527"
         }

Completion

The Vereafy 2FA completion can be as simple as the following lines of code:

     $vereafyInstance = new Vereafy(<your_APIKEY>);
     $vereafyInstance->complete(<pinRef>, <VERIFICATION_CODE>);

The completion method returns a response that should look like this if the parameters are correct:

         {
            "response":"success"
         }

Resend

In a case where your app users get impatient and hits the retry link on your app form, just call the resend method this way:

     $vereafyInstance = new Vereafy(<your_APIKEY>);
     $vereafyInstance->resend(<your_MOBILE>, <pinRef>);

The resend method returns a response that should look like this:

         {
             "status": "success",
             "pinRef": 1293488527
         }

Get Balance

To get your balance on Vereafy, the getbalance method is used this way:

        $vereafyInstance = new Vereafy(<your_APIKEY>);
        $vereafyInstance->getBalance();

The method requires no parameter, and the returned response should look like this:

        {
             "balance":1507
        }

Error Responses

In a case where the request fails due to one reason or another you should get an error response from the requested endpoint that looks like this:

        {
            "error":"Invalid PIN Ref",
            "code":"CE2000"
        }

The table below shows a list of error codes and their descriptions

Error Code Description
CE1001 Missing Fields
CE1002 Empty Fields
CE1006 Not a Nigerian Number
CE2000 Invalid PIN Ref
CE2002 PIN does not reference any verification request
CE2003 Mobile number does not match original request
CE2001 Invalid PIN
CE2004 Request Not Found
CE7000 Verification already succeeded
CE7001 Verification already failed
CE6000 Insufficient Balance
CE5000 Invalid Template ID
CE5001 Could not find referenced template

All versions of vereafy with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 cecula/vereafy contains the following files

Loading the files please wait ....