wip
This commit is contained in:
@@ -10,17 +10,28 @@ class ApiTesterController extends Controller
|
|||||||
{
|
{
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$request->validate([
|
$curl = curl_init();
|
||||||
'passport_serie' => ['required', 'string', Rule::in(PassportRepo::values())],
|
|
||||||
'passport_number' => ['required', 'numeric', 'digits:6'],
|
curl_setopt_array($curl, [
|
||||||
'card_number_masked' => ['required', 'string', 'max:255'],
|
CURLOPT_URL => 'http://10.3.158.102:9999/api/clientinfo/all',
|
||||||
'card_expire_date' => ['required', 'string', 'max:255'],
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
'start_date' => ['required', 'date'],
|
CURLOPT_ENCODING => '',
|
||||||
'end_date' => ['required', 'date'],
|
CURLOPT_MAXREDIRS => 10,
|
||||||
|
CURLOPT_TIMEOUT => 0,
|
||||||
|
CURLOPT_FOLLOWLOCATION => true,
|
||||||
|
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||||
|
CURLOPT_CUSTOMREQUEST => 'POST',
|
||||||
|
CURLOPT_POSTFIELDS => '{ "idSeria": "I-AS", "idNo": "314567", "clientType": "recipient", "cardMaskNumber": "993403******3258", "expDate": "07/49", "fromDate" : "01.01.2020", "toDate" : "09.05.2025" }',
|
||||||
|
CURLOPT_HTTPHEADER => [
|
||||||
|
'Authorization: Basic dGJ1c2VyOlFBWndzeDEyMw==',
|
||||||
|
'Content-Type: application/json',
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// $this->fetchApi($data['foo']);
|
$response = curl_exec($curl);
|
||||||
|
|
||||||
// return "<pre>{$response}</pre>";
|
curl_close($curl);
|
||||||
|
|
||||||
|
return "<pre>{$response}</pre>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,9 +58,7 @@ class DownloadCardTransaction extends Action
|
|||||||
return ActionResponse::danger($data->message);
|
return ActionResponse::danger($data->message);
|
||||||
}
|
}
|
||||||
|
|
||||||
info([$data]);
|
$this->generateFile($data);
|
||||||
|
|
||||||
// $this->generateFile($data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -129,5 +127,8 @@ class DownloadCardTransaction extends Action
|
|||||||
*
|
*
|
||||||
* @param ResponseTypes\AzatApiClientInfoAllResponse $data
|
* @param ResponseTypes\AzatApiClientInfoAllResponse $data
|
||||||
*/
|
*/
|
||||||
public function generateFile($data) {}
|
public function generateFile($data)
|
||||||
|
{
|
||||||
|
$data->transactions
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,13 +7,17 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<p><strong>FM0</strong></p>
|
<p><strong>FM0</strong></p>
|
||||||
<p>{{ $transactoin->depName }}</p>
|
<p>{{ $transaction->depName }}</p>
|
||||||
|
<p>МФО: <strong>{{ $transaction->mfo }}</strong></p>
|
||||||
<p>Н/к: <strong>101301000408</strong></p>
|
<p>Н/к: <strong>101301000408</strong></p>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
<p>Текущая дата: <strong>15/05/2025 17:52:59</strong></p>
|
<p>Текущая дата: <strong>{{ now()->format('H:i, d.m.Y') }}</strong></p>
|
||||||
<p class="title">ВЫПИСКА ПО СЧЕТУ КЛИЕНТА №9341304011</p>
|
<p>ВЫПИСКА ПО СЧЕТУ КЛИЕНТА №9341304011</p>
|
||||||
<p>Ф.И.О. владельца счета: <strong>MYRATLYÝEW DÖWRAN AŞYRMUHAMMEDOWIÇ</strong></p>
|
<p>Ф.И.О. владельца счета: <strong>{{ $transaction->clientName }}</strong></p>
|
||||||
|
<p>за период с {{ $transaction->fromDate }} по {{ $transaction->toDate }} </p>
|
||||||
|
|
||||||
|
<br>
|
||||||
<p>Исходящий остаток: <strong>7.73</strong></p>
|
<p>Исходящий остаток: <strong>7.73</strong></p>
|
||||||
<p>Входящий остаток: <strong>361.92</strong></p>
|
<p>Входящий остаток: <strong>361.92</strong></p>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,7 +37,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<!-- Fill rows here -->
|
@foreach($data->transactions as $transaction)
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
@stop
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user