@extends('layouts.billing') @section('title', __('billing.Checkout') . ' — ' . $plan->name) @push('styles') @endpush @section('content')
{{ __('billing.BackToPlans') }}
@if($errors->any())
{{ $errors->first() }}
@endif @if(isset($pendingPayment) && $pendingPayment)
{{ __('billing.PaymentPendingReview') }}

{{ __('billing.PendingPaymentDescription') }}

{{ __('billing.Gateway') }}: {{ $pendingPayment->gateway_label }} {{ __('billing.Amount') }}: ${{ number_format($pendingPayment->amount, 2) }} {{ __('billing.Submitted') }}: {{ $pendingPayment->created_at->diffForHumans() }}
@csrf
{{ __('billing.BackToPlans') }}
@endif
{{-- Left: Order summary --}}
{{ __('billing.OrderSummary') }}
{{ __('billing.Plan') }} {{ $plan->name }}
{{ __('billing.BillingCycle') }} {{ ucfirst($cycle) }}

{{ __('billing.Subtotal') }} {{ $currencySymbol }}{{ number_format($amount, 2) }}
{{ __('billing.Tax') }} {{ $currencySymbol }}0.00

{{ __('billing.Total') }} {{ $currencySymbol }}{{ number_format($amount, 2) }}
@if($subscription && $subscription->isActive() && $subscription->plan_id !== $plan->id)
@if($plan->price > ($subscription->plan->price ?? 0)) {{ __('billing.Upgrade') }}: {{ __('billing.UpgradeNotice') }} @else {{ __('billing.Downgrade') }}: {{ __('billing.DowngradeNotice') }} @endif
@endif {{-- Plan features summary --}}

{{ __('billing.Included') }}

@foreach($plan->getFormattedLimits() as $limit)
{{ $limit['display'] }} {{ $limit['label'] }}
@endforeach @foreach($plan->getActiveFeatures() as $feature)
{{ $feature['label'] }}
@endforeach
{{-- Right: Payment form --}}
@csrf {{-- Billing cycle selector --}}
{{ __('billing.BillingCycle') }}
{{-- Payment gateway selector --}}
{{ __('billing.PaymentMethod') }}
@if(count($gateways) === 0)

{{ __('billing.NoGatewaysAvailable') }}

@else
@foreach($gateways as $i => $gw) @endforeach
@endif
{{-- Offline payment section (bank details + proof upload) --}}
{{ __('billing.BankTransferDetails') }}

{{ __('billing.AmountToTransfer') }}

{{ $currencySymbol }}{{ number_format($amount, 2) }} {{ $currencyCode }}

@if(!empty($bankDetails) && (($bankDetails['bank_name'] ?? '') || ($bankDetails['account_number'] ?? '')))
@if($bankDetails['bank_name'] ?? '')
{{ __('billing.BankName') }} {{ $bankDetails['bank_name'] }}
@endif @if($bankDetails['account_holder'] ?? '')
{{ __('billing.AccountHolder') }} {{ $bankDetails['account_holder'] }}
@endif @if($bankDetails['account_number'] ?? '')
{{ __('billing.AccountNumber') }} {{ $bankDetails['account_number'] }}
@endif @if($bankDetails['iban'] ?? '')
{{ __('billing.IBAN') }} {{ $bankDetails['iban'] }}
@endif @if($bankDetails['swift'] ?? '')
{{ __('billing.SwiftBic') }} {{ $bankDetails['swift'] }}
@endif @if($bankDetails['branch'] ?? '')
{{ __('billing.Branch') }} {{ $bankDetails['branch'] }}
@endif
@if($bankDetails['instructions'] ?? '')

{{ __('billing.Instructions') }}

{{ $bankDetails['instructions'] }}

@endif @else
{{ __('billing.BankDetailsNotConfigured') }}
@endif

{{ __('billing.ClickOrDragFileHere') }}

{{ __('billing.AllowedFileTypes') }}

{{-- Submit --}} @if(count($gateways) > 0)

{{ __('billing.SecurePaymentNotice') }}

@endif
@push('scripts') @endpush @endsection