@extends('template.master') @section('page_styles') {{--CUSTOM STYLES HERE--}} @stop @section('content')
@include('payment.utilities.payment_form') @include('payment.utilities.card_details') @include('payment.utilities.cancel_option') @include('payment.utilities.upgrade_option')
{{-- --}} @php $cancelled = ['canceled at period end', 'canceled']; $last_payment = 0; $last_payment_date = ''; $next_payment = 0; $next_payment_date = ''; $last_payment_notice = false; @endphp @if(count($subscription_list) > 0) @foreach($subscription_list as $key => $subscription) @if(isset($subscription->status)) @php if(($next_payment_date < gmdate("Y-m-d", $subscription->latest_invoice->due_date) || $next_payment_date == '') && $subscription->status != 'past_due') { $next_payment = number_format($subscription->total/100, 2); $next_payment_date = gmdate("Y-m-d", $subscription->latest_invoice->due_date); } if(($last_payment_date < gmdate("Y-m-d", $subscription->current_period_start) || $last_payment_date == '') && $subscription->status == 'active') { $last_payment = number_format($subscription->latest_invoice->total/100, 2); $last_payment_date = gmdate("F d, Y", $subscription->current_period_start); if(in_array($subscription->status, ['past_due'])) { $last_payment_notice = true; } } @endphp {{-- --}} @endif @endforeach @else @endif
Payment GatewayPlan Status Price Start Date End Date Actions
Stripe{{ $subscription->plan->nickname }} @if(!empty($subscription->canceled_at)) Cancels on {{ gmdate("M d", $subscription->current_period_end) }} @else {{ ucfirst($subscription->status) }} @endif ${{ number_format($subscription->latest_invoice->total/100, 2) }} @if(isset($subscription->latest_invoice->lines->data[0]->period->start)) {{ gmdate("M d, Y hA", strtotime('-1 hour', $subscription->latest_invoice->lines->data[0]->period->start)) }} @endif @if(isset($subscription->latest_invoice->lines->data[0]->period->end)) {{ gmdate("M d, Y hA", strtotime('-1 hour', $subscription->latest_invoice->lines->data[0]->period->end)) }} @endif @if(!empty($subscription->canceled_at) || $subscription->status == 'past_due') Resubscribe @else @if($key < 3) Cancel @endif @endif
No Active Subscription/s

Invoices



@if(!empty($payment_history)) @foreach($payment_history as $key => $history) @endforeach @else @endif
Plan Status Price Start Date End Date
{{ $history->lines->data[0]->plan->nickname }} {{ ucfirst($history->status) }} ${{ number_format($history->total/100, 2) }} @if(isset($history->lines->data[0]->period->start)) {{ gmdate("M d, Y hA", $history->lines->data[0]->period->start) }} @endif @if(isset($history->lines->data[0]->period->end)) {{ gmdate("M d, Y hA", strtotime('-1 hour', $history->lines->data[0]->period->end)) }} @endif
No Invoices/s
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @include('payment.utilities.plan_headers')

Last payment

{{ $last_payment_date }} @if($last_payment_notice) Failed @endif
@if(!empty($customer->card_brand))
**** **** **** {{ $customer->card_last_four }}
@if($customer->card_brand == 'Visa') visa Created with Sketch. @elseif($customer->card_brand == 'MasterCard') @elseif($customer->card_brand == 'American Express') @endif
@endif

@if(!empty($last_payment)) ${{ number_format($last_payment, 2) }} @else FREE @endif

@if(isset($upcoming_invoice->total))

Next Payment on {{ gmdate("M d", @$upcoming_invoice->period_end) }}

@if(isset($upcoming_invoice->total)) ${{ substr($upcoming_invoice->total, 0, -2).'.'.substr($upcoming_invoice->total, -2) }} @else FREE @endif

${{ substr(@$upcoming_invoice->total, 0, -2).'.'.substr(@$upcoming_invoice->total, -2) }}

@endif @if(!empty($customer->card_brand))

Your card

**** **** **** {{ $customer->card_last_four }}
@if($customer->card_brand == 'Visa') visa Created with Sketch. @elseif($customer->card_brand == 'MasterCard') @elseif($customer->card_brand == 'American Express') @endif
@endif
Change Payment Method @if($errors->any()) {{$errors->first()}} @endif {{-- Payment History--}}
@stop @section('page_modals') @stop @section('page_scripts') @stop