wip
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace App\Nova\Resources\Order\Card\CardTransaction\Actions\ResponseTypes;
|
||||
|
||||
class AzatApiClientInfoAllResponse
|
||||
{
|
||||
public string $idSeria;
|
||||
|
||||
public string $idNo;
|
||||
|
||||
public string $cardMaskNumber;
|
||||
|
||||
public string $expDate;
|
||||
|
||||
public string $clientType;
|
||||
|
||||
public string $fromDate;
|
||||
|
||||
public string $toDate;
|
||||
|
||||
public string $clientName;
|
||||
|
||||
public string $depName;
|
||||
|
||||
public string $cardPan;
|
||||
|
||||
public string $cardAccountNumber;
|
||||
|
||||
public string $birthDate;
|
||||
|
||||
public string $mfo;
|
||||
|
||||
public string $passOrg;
|
||||
|
||||
public string $passDate;
|
||||
|
||||
public string $address;
|
||||
|
||||
public string $phone;
|
||||
|
||||
public string $errCode;
|
||||
|
||||
public int $message;
|
||||
|
||||
public string $messageRu;
|
||||
|
||||
public string $messageEn;
|
||||
|
||||
/** array<int, Object{'trandate': string, 'currency': string, 'opersum': float, 'actionName': string, 'opername': string}> */
|
||||
public array $transactions;
|
||||
}
|
||||
Reference in New Issue
Block a user