NASER add tahesab sanad list and fix som issues
This commit is contained in:
@@ -363,14 +363,37 @@ class TahesabController extends Controller
|
|||||||
{
|
{
|
||||||
$tahesab = Http::withoutVerifying()->withHeaders([
|
$tahesab = Http::withoutVerifying()->withHeaders([
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
'DBName'=> 'tahesabDB1',
|
'DBName' => $this->Config('tahesab_db'),
|
||||||
'Authorization'=> 'Bearer K7F5P8H2Q1O4I8M8M4J3L4L3W8N2A2P6I2T4I8N4E2T2N2D7O7Y5K3W6P2N4G3X2T1T4C5V4I1X2T6S1'
|
'Authorization' => "Bearer " . $this->Config('tahesab_token'),
|
||||||
])->post('https://217.114.40.30:8081/', ["CheckHealth" => [] ])->json();
|
])->post((string)env('TAHESAB'), [
|
||||||
|
"CheckHealth" => []
|
||||||
|
])->json();
|
||||||
|
|
||||||
|
return $tahesab;
|
||||||
|
// if($tahesab['Api_Status'] === "OK" && $tahesab['DB_Status'] === "OK"){
|
||||||
|
// return true;
|
||||||
|
// }else{
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
public function sanadList()
|
||||||
|
{
|
||||||
|
$tahesab = Http::withoutVerifying()->withHeaders([
|
||||||
|
'Content-Type' => 'application/json',
|
||||||
|
'DBName' => $this->Config('tahesab_db'),
|
||||||
|
'Authorization' => "Bearer " . $this->Config('tahesab_token'),
|
||||||
|
])->post((string)env('TAHESAB'), [
|
||||||
|
"DoListAsnad" => [
|
||||||
|
10, /*Count_Last,*/
|
||||||
|
"", /*Moshtari_Code,*/
|
||||||
|
"", /*"AzTarikhShamsi"*/
|
||||||
|
(string)Verta::instance(Carbon::now()->format('Y-m-d')), /*"TaTarikhShamsi"*/
|
||||||
|
"", /*"FilterNoSanad"*/
|
||||||
|
0, /*Jens_Felez*/
|
||||||
|
]
|
||||||
|
])->json();
|
||||||
|
return $tahesab;
|
||||||
|
|
||||||
if($tahesab['Api_Status'] === "OK" && $tahesab['DB_Status'] === "OK"){
|
|
||||||
return true;
|
|
||||||
}else{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ Route::get('/refPricer', function () {
|
|||||||
|
|
||||||
Route::get('/1', function () {
|
Route::get('/1', function () {
|
||||||
$tah = new \App\Http\Controllers\Admin\TahesabController();
|
$tah = new \App\Http\Controllers\Admin\TahesabController();
|
||||||
|
return $tah->sanadList();
|
||||||
|
return $tah->healthCheck();
|
||||||
return $tah->wallet([
|
return $tah->wallet([
|
||||||
"customer_id" => "466",
|
"customer_id" => "466",
|
||||||
"value" => "50000",
|
"value" => "50000",
|
||||||
|
|||||||
Reference in New Issue
Block a user