@extends('storefront.layout') @section('title', 'Checkout') @section('content')

Checkout

Review your order, choose how you'll pay, and we'll send payment instructions by email.

@foreach ($notices as $n)
{{ $n }}
@endforeach @if ($errors->any())
@endif @php $defaultShippingAddress = $shippingAddresses->firstWhere('is_default', true) ?? $shippingAddresses->first(); $selectedShippingAddressId = (string) old('shipping_address_id', $defaultShippingAddress?->id ?? ''); $shippingAddressOptions = $shippingAddresses->map(fn ($addr) => [ 'id' => $addr->id, 'contact_name' => $addr->contact_name ?? $customer->company_name, 'phone' => $addr->phone, 'line1' => $addr->line1, 'line2' => $addr->line2, 'city' => $addr->city, 'state' => $addr->state, 'postal_code' => $addr->postal_code, 'country_code' => $addr->country_code, 'is_default' => (bool) $addr->is_default, ])->values(); @endphp
@csrf
{{-- Shipping --}}

Shipping address

Choose an address or add a new one.

{{-- Payment --}}

Payment method

Choose ACH, wire, card, or approved payment terms.

@foreach ($paymentMethods as $pm) @php $paymentTermsUnavailable = $pm === \App\Enums\PaymentMethod::Invoice && $approvedCreditApplication === null; @endphp @if ($paymentTermsUnavailable)

Pay on Terms

Apply for business credit to request payment terms. Approval and credit limits are not guaranteed.

Apply for payment terms
@continue @endif @endforeach
@error('payment_method')

{{ $message }}

@enderror
{{-- Extra fields --}}

{{-- Summary --}}
@endsection