1. Go to this page and download the library: Download radeir/sdk 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/ */
radeir / sdk example snippets
use Radeir\Services\RadeServices;
// Configuration
$config = [
'username' => 'your_username',
'password' => 'your_password',
'scopes' => ['scope1', 'scope2'],
'baseUrl' => 'https://api.rade.ir/api'
];
// Create service instance
$radeServices = new RadeServices($config);
// Use services
try {
// Documentation for each service is available in the Services section below
} catch (\Radeir\Exceptions\RadeException $e) {
// Error handling
echo "Error: " . $e->getMessage();
}
use Radeir\Facade\Rade;
// Convert card number to IBAN
$ibanInfo = Rade::cardToIban('6037991234567890');
// Convert card number to deposit account
$depositInfo = Rade::cardToDeposit('6037991234567890');
// Documentation for each service is available in the Services section below
use Radeir\Services\RadeServices;
class MyController
{
public function index(RadeServices $radeServices)
{
// Documentation for each service is available in the Services section below
$ibanInfo = $radeServices->cardToIban('6037991234567890');
return response()->json($ibanInfo);
}
}