PHP code example of aryan-developer / zibal

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

    

aryan-developer / zibal example snippets




use Aryandev\zibal\Zibal;
use Aryandev\zibal\ZibalException;

try {
    $zibal->request(amount: 10000,redirect: true);
} catch (ZibalException $e) {
    echo "<pre>{$e->getZibalMessage()}</pre>";
}


use Aryandev\zibal\Zibal;
use Aryandev\zibal\ZibalException;

d8d540d", "https://example.ir/verify.php");
    try {
        $response = $zibal->verify($_GET['trackId']);
        var_dump($response);
    } catch (ZibalException $e) {
        echo $e->getZibalResultCode();
    }
}else{
    echo "پرداخت با شکست مواجه شد.";
}
bash
php -S localhost:8000