1. Go to this page and download the library: Download finq/laravel-ihamkor 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/ */
finq / laravel-ihamkor example snippets
use Finq\Ihamkor\Facades\Ihamkor;
// Get taxi income data
$response = Ihamkor::taxiIncome($pinfl, $signature);
// Register user verification
$response = Ihamkor::registerMyId($pinfl, $job_id);
// Get person info
$response = Ihamkor::getPersonInfo($pinfl, $signature);
use Finq\Ihamkor\IhamkorService;
class YourController extends Controller
{
public function __construct(
protected IhamkorService $ihamkor
) {}
public function index()
{
$response = $this->ihamkor->taxiIncome($pinfl, $signature);
if ($response->successful()) {
return $response->json();
}
return response()->json(['error' => 'Request failed'], 500);
}
}
use Finq\Ihamkor\Facades\Ihamkor;
$response = Ihamkor::taxiIncome($pinfl, $signature);
// Check if request was successful
if ($response->successful()) {
$data = $response->json();
}
// Check for specific status codes
if ($response->status() === 200) {
// Handle success
}
// Get response body as array
$data = $response->json();
// Get response body as string
$body = $response->body();