Giter Club home page Giter Club logo

laravel-onfido's Introduction

The Onfido Laravel Package

The Laravel wrapper for the Onfido PHP API Client.

Installation

Install using composer:

composer require worksome/laravel-onfido

Publish the configuration file with the following command:

php artisan vendor:publish --provider "Worksome\Onfido\OnfidoServiceProvider"

Configuration

Remember to add your Onfido API key to your .env file.

ONFIDO_API_KEY=api_sandbox.ABC...

Usage

I would always encourage anyone to use the official PHP package as reference, and this is simply a Laravel wrapper. However, I will provide an example on how to create an applicant.

Remember to import the Onfido facade, by adding use Worksome\Onfido\Facades\Onfido; at the top of your file.

To create an applicant and send a check:

$applicant = Onfido::createApplicant([
    'first_name' => 'John',
    'last_name' => 'Doe',
    'email' => '[email protected]',
]);

$onfido_check = Onfido::createCheck([
    'applicant_id' => $applicant['id'],
    'report_names' => ['right_to_work'],
    'applicant_provides_data' => true,
]);

The above is all that is required to create an applicant and send the applicant a right to work check via Onfido.

You can then consult the results of the check as an array:

$applicant['id']
$onfido_check['id']
$onfido_check['status']
$onfido_check['form_uri']

To see all possible return data check the official PHP package documentation over at https://github.com/onfido/api-php-client

laravel-onfido's People

Contributors

andrevalentin avatar lukeraymonddowning avatar owenvoke avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.