This commit is contained in:
2025-05-26 21:40:03 +05:00
parent 808742b781
commit d0d26039d3
3 changed files with 38 additions and 18 deletions

View File

@@ -10,17 +10,28 @@ class ApiTesterController extends Controller
{
public function index(Request $request)
{
$request->validate([
'passport_serie' => ['required', 'string', Rule::in(PassportRepo::values())],
'passport_number' => ['required', 'numeric', 'digits:6'],
'card_number_masked' => ['required', 'string', 'max:255'],
'card_expire_date' => ['required', 'string', 'max:255'],
'start_date' => ['required', 'date'],
'end_date' => ['required', 'date'],
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'http://10.3.158.102:9999/api/clientinfo/all',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
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>";
}
}

View File

@@ -58,9 +58,7 @@ class DownloadCardTransaction extends Action
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
*/
public function generateFile($data) {}
public function generateFile($data)
{
$data->transactions
}
}

View File

@@ -7,13 +7,17 @@
</head>
<body>
<p><strong>FM0</strong></p>
<p>{{ $transactoin->depName }}</p>
<p>{{ $transaction->depName }}</p>
<p>МФО: <strong>{{ $transaction->mfo }}</strong></p>
<p>Н/к: <strong>101301000408</strong></p>
<div class="section">
<p>Текущая дата: <strong>15/05/2025 17:52:59</strong></p>
<p class="title">ВЫПИСКА ПО СЧЕТУ КЛИЕНТА №9341304011</p>
<p>Ф.И.О. владельца счета: <strong>MYRATLYÝEW DÖWRAN AŞYRMUHAMMEDOWIÇ</strong></p>
<p>Текущая дата: <strong>{{ now()->format('H:i, d.m.Y') }}</strong></p>
<p>ВЫПИСКА ПО СЧЕТУ КЛИЕНТА №9341304011</p>
<p>Ф.И.О. владельца счета: <strong>{{ $transaction->clientName }}</strong></p>
<p>за период с {{ $transaction->fromDate }} по {{ $transaction->toDate }} </p>
<br>
<p>Исходящий остаток: <strong>7.73</strong></p>
<p>Входящий остаток: <strong>361.92</strong></p>
</div>
@@ -33,7 +37,11 @@
</tr>
</thead>
<tbody>
<!-- Fill rows here -->
@foreach($data->transactions as $transaction)
<tr>
<th></th>
</tr>
@stop
</tbody>
</table>