@extends('layouts.app') @section('title', 'Shipping') @section('content')

Dispatch

Parcel2Go

Compare services, arrange a collection and download labels.

@isset($integrationError)@endisset @if($bookingPending)@endif @if($bookingResult) @php $paymentUrl = $bookingResult['Links']['payment'] ?? null; $paymentHost = is_string($paymentUrl) ? parse_url($paymentUrl, PHP_URL_HOST) : null; @endphp

Collection order #{{ $bookingResult['OrderId'] ?? '—' }} created

Total: £{{ number_format((float) ($bookingResult['TotalPrice'] ?? 0), 2) }}. Payment and collection confirmation are completed with Parcel2Go.

@if($paymentHost && ($paymentHost === 'parcel2go.com' || str_ends_with($paymentHost, '.parcel2go.com')))Complete payment ↗@endif
@endif

Account

{{ trim(($account['Forename'] ?? '').' '.($account['Surname'] ?? '')) ?: 'Unavailable' }}

{{ $account['Email'] ?? '' }}

Prepay balance

£{{ number_format((float) ($balance['Balance'] ?? 0), 2) }}

1. Compare services

Enter a UK parcel. Dimensions are centimetres and weight is kilograms.

@csrf @foreach([['weight','Weight (kg)','0.1'],['length','Length (cm)','1'],['width','Width (cm)','1'],['height','Height (cm)','1'],['value','Parcel value (£)','0.01']] as [$field,$label,$step])@endforeach
@if(count($quotes))

2. Choose a collection service

@foreach($quotes as $quote)@php $service = $quote['Service'] ?? []; @endphp

{{ $service['Name'] ?? 'Courier service' }}

{{ $service['CourierName'] ?? '' }} · {{ $service['CollectionType'] ?? 'Unknown' }}

{{ isset($quote['TotalPrice']) ? '£'.number_format((float) $quote['TotalPrice'], 2) : 'See details' }}

@if(($service['CollectionType'] ?? null) === 'Collection' && ! empty($service['Slug']))
@csrf
@endif
@endforeach
@endif @if(count($collectionDates) && $selectedService)

3. Arrange collection

Creating the order does not take payment. Parcel2Go will provide a payment link.

@csrf
Sender and collection@foreach([['sender_name','Name'],['sender_email','Email'],['sender_phone','Phone'],['sender_property','Property'],['sender_street','Street'],['sender_town','Town']] as [$field,$label])@endforeach
Recipient and delivery@foreach([['recipient_name','Name'],['recipient_email','Email'],['recipient_phone','Phone'],['recipient_property','Property'],['recipient_street','Street'],['recipient_town','Town']] as [$field,$label])@endforeach
@endif

Recent shipments and labels

@forelse(($orders['Orders'] ?? []) as $order)@empty@endforelse
OrderCourierServiceStatusRecipientLabel
{{ $order['OrderLineId'] ?? '—' }}{{ $order['Courier'] ?? '—' }}{{ $order['Service'] ?? '—' }}{{ ($order['Tracking']['Delivered'] ?? false) ? 'Delivered' : 'In transit' }}{{ $order['DeliveryAddress']['ContactName'] ?? '—' }}@if(! empty($order['Hash']) && ! empty($order['OrderLineId']))Download PDF@elseUnavailable@endif
No shipments available.
@endsection