PHP code example of imv / gateway

1. Go to this page and download the library: Download imv/gateway 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/ */

    

imv / gateway example snippets


use Imv\Gateway\Facades\Gateway;

// DTO ob'ekti qaytadi
$organ = Gateway::getOrganDataByTin('0000000000');

echo $organ->company->name;
echo $organ->company->tin;

$passport = Gateway::getPassportInfo('00000000000000');

echo $passport->firstName;
echo $passport->document->document;

$timestamp = Gateway::getEImzoTimestamp($sign);
echo $timestamp->pkcs7b64;

$verify = Gateway::verifyAttached($pkcs7b64);
echo $verify->status;

use Imv\Gateway\Exceptions\GatewayException;

try {
    $data = Gateway::getPassportInfo('invalid_pinfl');
} catch (GatewayException $e) {
    echo $e->getMessage(); // API dan kelgan xato xabari
}
bash
php artisan vendor:publish --tag="gateway-config"