PHP code example of agro-zamin / business-id
1. Go to this page and download the library: Download agro-zamin/business-id 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/ */
agro-zamin / business-id example snippets
use AgroZamin\Integration\BusinessId\BusinessId;
use AgroZamin\Integration\BusinessId\RequestModel\Organization\Organization;
use GuzzleHttp\Client;
$serviceToken = $_ENV['BUSINESS_ID_SERVICE_TOKEN'];
$client = new Client([
'base_uri' => $_ENV['BUSINESS_ID_BASE_URI']
]);
$businessId = new BusinessId($serviceToken, $client);
$tin = 123456789;
$organization = $businessId->requestModel((new Organization())->byTin($tin))->sendRequest();
php composer