pakat/php-sdk

There is no license information available for the latest version (dev-master) of this package.

Pakat Identification System

dev-master 2019-08-17 10:14 UTC

This package is auto-updated.

Last update: 2019-08-17 10:14:18 UTC


README

First: include "Pakat.php";

Next: $Pakat = new Pakat("{PRIVATE_KEY}", "{PUBLIC_KEY}", "{CALLBACK_URL}", "{DEVELOPER_KEY}");

Point: Please login to pakat website and register your application and get private key and public key and developer key

newLink();

$link = $Pakat->newLink();

This Method make login link on the response back to you a url $link->url you should transfer user in to this link

Point: Set callback url carefully

checkRequest($LoginToken, $DeveloperHash); and getUserData($LoginToken);

$LoginToken = $_GET['login_token'];

$DeveloperHash = $_GET['developer_hash'];

$check = $Pakat->checkRequest($LoginToken, $DeveloperHash);

if($check) {

    // Get User Data 

    $userData = getUserData($LoginToken);

} else {

    die("Sorry, login token not valid");

}