1. Go to this page and download the library: Download tahsilat/tahsilat-php 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/ */
tahsilat / tahsilat-php example snippets
// Using TahsilatClient (recommended)
$tahsilat = new \Tahsilat\TahsilatClient('sk_test_YOUR_API_KEY');
// Or using static configuration
\Tahsilat\Tahsilat::setApiKey('sk_test_YOUR_API_KEY');
$tahsilat = new \Tahsilat\TahsilatClient('sk_test_YOUR_API_KEY', [
'max_retries' => 5,
'timeout' => 120,
'connect_timeout' => 60,
'verify_ssl_certs' => true
]);
// Or using setters
$tahsilat->setConfig('timeout', 120);
// Get API key
$apiKey = $tahsilat->getApiKey();
// Set new API key
$tahsilat->setApiKey('sk_live_NEW_API_KEY');
// Get/Set access token
$token = $tahsilat->getAccessToken();
$tahsilat->setAccessToken('new_access_token');