@extends('layouts.guest-landing') {{-- Use public layout --}} @section('title', __('checkout.title')) @push('styles') {{-- Basic styling for Stripe Element container --}} @endpush @section('content')
@csrf {{-- 1. Contact & Billing Address Information Section --}}

{{ __('checkout.contact_billing_title') }}

@guest {{-- {{ __('checkout.already_have_account') }} --}} @endguest @auth {{ __('checkout.logged_in_as') }} {{ auth()->user()->email }} @endauth
{{-- Email Input --}}
@error('contact_email')

{{ $message }}

@enderror
{{-- First Name & Last Name --}}
@error('first_name')

{{ $message }}

@enderror
@error('last_name')

{{ $message }}

@enderror
{{-- Company (Optional) --}}
@error('company')

{{ $message }}

@enderror
{{-- Billing Address Line 1 --}}
@error('billing_address_line_1')

{{ $message }}

@enderror
{{-- Billing Address Line 2 --}}
@error('billing_address_line_2')

{{ $message }}

@enderror
{{-- City, State, Zip Row --}}
@error('billing_city')

{{ $message }}

@enderror
@error('billing_state')

{{ $message }}

@enderror
@error('billing_zip_code')

{{ $message }}

@enderror
{{-- 2. Order Summary & Payment Section --}}

{{ __('checkout.payment_details_title') }}

{{-- Display Surcharge if applicable --}} @if (($enableSurcharge ?? false) && ($surchargeAmount ?? 0) > 0)

{{ __('checkout.subtotal_products_donation') }} ${{ number_format(($finalAmountForPayment ?? ($cartTotal ?? 0)) - ($surchargeAmount ?? 0), 2) }}

{{ $surchargeLabel ?? 'Convenience Fee' }}: +${{ number_format($surchargeAmount ?? 0, 2) }}

@endif

{{ __('checkout.total_amount_due') }}

${{ number_format($finalAmountForPayment ?? ($cartTotal ?? 0), 2) }}

@if (!empty($paymentErrorMessage))

{{ __('checkout.payment_error') }}

{{ $paymentErrorMessage }}

@endif {{-- Stripe Payment Section --}} @if (($activePaymentGateway ?? 'stripe') === 'stripe') @if (!empty($stripePublicKey) && !empty($paymentIntentClientSecret))
@else

{{ $paymentErrorMessage ?: __('checkout.stripe_unavailable') }}

@endif @endif {{-- Till Payments Section --}} @if (($activePaymentGateway ?? 'stripe') === 'till') @if (!empty($tillPublicKey))

{{ __('checkout.complete_payment_till') }}

@else

{{ $paymentErrorMessage ?: __('checkout.till_unavailable') }}

@endif @endif
← {{ __('checkout.back_to_cart') }}
@endsection @push('scripts') {{-- Faker Script for Testing (only when FAKER_ENABLED=true) --}} @php $fakerEnabled = env('FAKER_ENABLED', false); $isFakerEnabled = $fakerEnabled === 'true' || $fakerEnabled === true; @endphp @if ($isFakerEnabled) @else @endif {{-- Stripe Payment Integration with PO Numbers --}} @if (($activePaymentGateway ?? 'stripe') === 'stripe' && !empty($stripePublicKey) && !empty($paymentIntentClientSecret)) {{-- Till Payments Integration with PO Numbers --}} @elseif (($activePaymentGateway ?? 'stripe') === 'till' && !empty($tillPublicKey)) @endif @endpush