wip
This commit is contained in:
@@ -12,27 +12,27 @@ class CardTransactionController extends Controller
|
||||
{
|
||||
public function show(CardTransaction $transaction)
|
||||
{
|
||||
$a = new DownloadCardTransaction;
|
||||
// $a = new DownloadCardTransaction;
|
||||
|
||||
$start_date = Carbon::create(date('Y-m-d', strtotime('-12 months')));
|
||||
$end_date = Carbon::create(date('Y-m-d'));
|
||||
// $start_date = Carbon::create(date('Y-m-d', strtotime('-12 months')));
|
||||
// $end_date = Carbon::create(date('Y-m-d'));
|
||||
|
||||
$response = $a->fetchApi(
|
||||
passport_serie: $transaction->passport_serie,
|
||||
passport_id: $transaction->passport_id,
|
||||
card_number_masked: Str::mask($transaction->card_number, '*', 6, 6),
|
||||
card_expire_date: $transaction->card_month.'/'.substr($transaction->card_year, 2),
|
||||
start_date: $start_date->format('d.m.Y'),
|
||||
end_date: $end_date->format('d.m.Y'),
|
||||
);
|
||||
// $response = $a->fetchApi(
|
||||
// passport_serie: $transaction->passport_serie,
|
||||
// passport_id: $transaction->passport_id,
|
||||
// card_number_masked: Str::mask($transaction->card_number, '*', 6, 6),
|
||||
// card_expire_date: $transaction->card_month.'/'.substr($transaction->card_year, 2),
|
||||
// start_date: $start_date->format('d.m.Y'),
|
||||
// end_date: $end_date->format('d.m.Y'),
|
||||
// );
|
||||
|
||||
/** @var ResponseTypes\AzatApiClientInfoAllResponse */
|
||||
$data = Str::isJson($response)
|
||||
? json_decode($response)
|
||||
: emptyClass(errCode: 1, message: 'Connection issue to VP');
|
||||
// /** @var ResponseTypes\AzatApiClientInfoAllResponse */
|
||||
// $data = Str::isJson($response)
|
||||
// ? json_decode($response)
|
||||
// : emptyClass(errCode: 1, message: 'Connection issue to VP');
|
||||
|
||||
return view('orders.cards.card-transaction.download-card-transaction', [
|
||||
'transaction' => $data
|
||||
]);
|
||||
// return view('orders.cards.card-transaction.download-card-transaction', [
|
||||
// 'transaction' => $data
|
||||
// ]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user