@extends('front.layouts.account')
<?php
$title = 'My Payment Method';
$customerTypes = Config("params.customer_types");
$currency = Config("params.currency");
$paymentMethods = Config("params.payment_methods");
?>
@include('front/common/meta')
@section('content')

<div class="col-lg-8 px-lg-5 shadow py-lg-5 py-3">


    <h4 class="font-weight-bold">Payment Method </h4>
    @if(isset($model->paymentMethod))
    <div class="package package-header-bg-three text-white p-4 row no-gutters">
        <div class="col-md-6 text-md-left text-center"> <?php echo $paymentMethods[$model->paymentMethod] ?>
        </div>

    </div>
    <br clear="all"/>
    <div class="row">


        @if($model->paymentMethod == "credit_card")
        <ul class="list-group">
            <li class="list-group-item"><strong>Card Number:</strong> ************{{$paymentMethod->card->last4}}</li>
            <li class="list-group-item"><strong>Brand:</strong> {{$paymentMethod->card->brand}}</li>
            <li class="list-group-item"><strong>Expiry:</strong> {{$paymentMethod->card->exp_month}}/{{$paymentMethod->card->exp_year}}</li>
        </ul>
        @else
        @if(isset($paymentMethod->start_date))
        <div class="col-lg-12">
            <ul class="list-group">
                <li class="list-group-item"><strong>Start Date:</strong> <?php echo date("d/m/Y", strtotime($paymentMethod->start_date)) ?></li>
            </ul>
        </div>
        @endif
        @endif


    </div
    @else
    <div class="form-row mt-4">
        <div class="alert alert-warning" role="alert">
            You haven't subscribe to any of our packages.
        </div>
    </div>

    @endif
</div>

@endsection

@section('myscript')



@endsection