@extends('layouts.dash2') @section('title', 'Card Details') @section('content')
@include('partials._mobile_header', [ 'title' => 'Card Details', 'showBackButton' => true, 'backUrl' => route('cards'), 'showNotifications' => true, 'showDarkMode' => true, 'financeUser' => Auth::user() ])
@if(session('message'))
@if(session('type') == 'success') @else @endif

{{ session('message') }}

@endif
@if($card->status == 'active') Active @elseif($card->status == 'pending') Pending @elseif($card->status == 'inactive') Inactive @elseif($card->status == 'blocked') Blocked @elseif($card->status == 'rejected') Rejected @else {{ ucfirst($card->status) }} @endif
@if($card->status == 'active')
@csrf
@elseif($card->status == 'inactive')
@csrf
@endif @if(in_array($card->status, ['active', 'inactive']))
@csrf
@endif Transactions

Virtual Card

@if($card->card_type == 'visa')
@elseif($card->card_type == 'mastercard')
@elseif($card->card_type == 'american_express')
@else
@endif
{{ $settings->site_name ?? 'Bank' }}
Virtual Banking
@if($card->card_type == 'visa')
VISA
@elseif($card->card_type == 'mastercard')
MasterCard
@elseif($card->card_type == 'american_express')
AMEX
@else @endif
@if($card->status == 'active') •••• •••• •••• {{ $card->last_four }} @if(isset($card->card_number)) @endif @else •••• •••• •••• •••• @endif
Card Holder
{{ $card->card_holder_name }}
Valid Thru
@if($card->status == 'active' && isset($card->expiry_month) && isset($card->expiry_year)) {{ sprintf('%02d', $card->expiry_month) }}/{{ substr($card->expiry_year, -2) }} @else ••/•• @endif
@if($card->card_type == 'visa')
@elseif($card->card_type == 'mastercard')
@elseif($card->card_type == 'american_express')
@else
@endif
CVV
@if($card->status == 'active' && isset($card->cvv)) {{ $card->cvv }} @else ••• @endif

{{ $settings->site_name ?? 'Bank' }} Virtual Card

Customer Service: 1-800-XXX-XXXX

@if($card->status == 'active')
@endif

Card Information

Card Type {{ ucfirst(str_replace('_', ' ', $card->card_type)) }}
Card Level {{ ucfirst($card->card_level) }}
Currency {{ $card->currency }}
Daily Limit {{ $card->currency }} {{ number_format($card->daily_limit, 2) }}
Available Balance {{ $card->currency }} {{ number_format($card->balance, 2) }}
Created {{ $card->created_at->format('M d, Y') }}

Billing Information

Cardholder Name {{ $card->card_holder_name }}
Address {{ $card->billing_address ?? 'N/A' }}
City {{ $card->billing_city ?? 'N/A' }}
ZIP Code {{ $card->billing_zip ?? 'N/A' }}
@if(isset($recentTransactions) && count($recentTransactions) > 0)

Recent Transactions

View All
@foreach($recentTransactions as $transaction)
@if($transaction->transaction_type == 'purchase') @elseif($transaction->transaction_type == 'refund') @else @endif

{{ $transaction->description }}

{{ \Carbon\Carbon::parse($transaction->transaction_date)->format('M d, Y h:i A') }}

@if($transaction->transaction_type == 'purchase') -{{ $card->currency }} {{ number_format(abs($transaction->amount), 2) }} @else +{{ $card->currency }} {{ number_format(abs($transaction->amount), 2) }} @endif

{{ ucfirst($transaction->status) }}
@endforeach
@endif
@endsection