This commit is contained in:
2025-05-24 15:25:55 +05:00
parent b87afba780
commit 4af1363b8b
4 changed files with 90 additions and 12 deletions

View File

@@ -49,19 +49,14 @@ class DownloadCardTransaction extends Action
end_date: $end_date->format('d.m.Y'),
);
$data = json_decode($response);
/** @var ResponseTypes\AzatApiClientInfoAllResponse */
$data = Str::isJson($response)
? json_decode($response)
: emptyClass(errCode: 1, message: 'Connection issue to VP');
// if (! is_array($response)) {
// return ActionResponse::danger('Connection issue');
// }
// if ($response['errCode'] != 0) {
// return ActionResponse::danger($response['message']);
// }
info([
'type' => $data,
]);
if ($data->errCode != 0) {
return ActionResponse::danger($data->message);
}
}
/**