1. Go to this page and download the library: Download wedevbr/mati-laravel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wedevbr / mati-laravel example snippets
// Using facade
use WeDevBr\Mati\MatiFacade;
$result = MatiFacade::createVerification();
// Using singleton
$result = $this->mati->createVerification();
// Using IoC container
use WeDevBr\Mati\Mati;
# ...
public function myFunction(Mati $mati) {
$result = $mati->createVerification();
# ...
}
$verification = MatiFacade::createVerification(['id' => 'localUserId'], 'flowId', '10.20.30.40', 'User-Agent String');
$document1 = new \WeDevBr\Mati\Inputs\DocumentPhoto;
$document1->setGroup(0)
->setType('national-id')
->setCountry('US')
->setRegion('CA')
->setPage('front')
->setFilePath('/tmp/doc001.jpg');
Mati::sendInputs($verification->identity, [$document1]);
// After the webhook notification, data can be acquired doing this:
$status = MatiFacade::retrieveResourceDataFromUrl($webhook_data->resource);