shepherrrd / dotta-php
dotta-php is a lightweight and intuitive package designed to streamline the integration process of dotta biometrics service and empower businesses to harness the power of dotta effortlessly.
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/shepherrrd/dotta-php
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^7.8
README
dotta-php is a lightweight and intuitive package designed to streamline the integration process of dotta API and empower businesses to harness the power of dotta biometric service effortlessly.
dotta offers a wealth of functionality for performing real-time identity verification in the most convenient and efficient approach, but getting started and putting all the codes together can sometimes be complex and time-consuming. With dotta-php, we've simplified the integration process, allowing you to focus on building amazing applications without getting bogged down in implementation details.
Getting Started
- Install the
dotta-phppackage from Packagist.
composer require shepherrrd/dotta-php
-
Setup
dotta-phpwith the configuration//setup dotta config public $apiKey = env('dotta-apikey'); public $publicKey = env('dotta-publickey'); public $privateKey = env('dotta-privatekey'); public $environment = env('dotta-environment') // DottaEnvironment::PRODUCTION; public $baseUrlProduction = env('dotta-produrl'); public $baseUrlSandbox env('dotta-sandboxurl'); public $httpClient = new client() //guzzlehttpclient; $config = new Dotta\Model\Config( $apikey, $publicKey, $privateKey, $environment, $baseUrlProduction, $baseUrlSandbox, $httpClient ); -
You can now access Any member of the Dotta Class
//Initialize the dotta class with the config $dotta = new Dotta\Dotta($config); $photo = $request->files('photo') ?? "images/usedotta.jpg"; $faceAttribute = $dotta->getFaceAttributes($photo);
Dotta Configurations Options
| Option | Description |
|---|---|
| ApiKey | Base64 encode string of your dotta public and private API keys concatenated in this format PUBLICKEY:PRIVATEKEY |
| PublicKey | Your dotta public API key |
| PrivateKey | Your dotta private API key |
| Environment | Enum to specify which dotta environment you want to use |
| BaseUrlProduction | API base url for dotta's production environment. |
| BaseUrlSandbox | API base url for dotta's sandbox or test environment. |
Pass the your public and private key if you don't know how to get a base64 string encoding of your keys. Otherwise, just pass the ApiKey. When you pass the ApiKey, you won't need to pass the public and private keys.