@extends('layouts.app') @section('title', 'Payment Response') @push('styles') @endpush @section('content')
@if($status === 'success')

Payment Successful!

{{ $message }}

@if(isset($additionalPayment) && $additionalPayment) Your additional charge payment has been processed successfully. Your shipment will be processed and shipped soon. @else Your shipment payment has been processed successfully. Your shipment will be processed and shipped soon. @endif

@php // Prioritize additionalPayment if it exists, otherwise use shipmentPayment $payment = $additionalPayment ?? $shipmentPayment ?? null; @endphp @if($payment)

Payment Details:

Tracking Number: {{ $payment->tracking_number ?? 'N/A' }}

Amount Paid: ₹ {{ number_format($payment->amount ?? 0, 2) }}

@if($payment->suite_number)

Suite Number: {{ $payment->suite_number }}

@endif @if(isset($additionalPayment) && $additionalPayment)

Payment Type: Additional Charge

@endif
@endif
@if($isAuthenticated ?? false) View Shipments Go to Dashboard @else

Please log in to view your updated shipment status.

Login to View Shipments @endif
@else

Payment {{ $status === 'cancelled' ? 'Cancelled' : 'Failed' }}

{{ $message }}

@if($status === 'cancelled') Your payment was cancelled. Please try again if you wish to complete the payment. @else There was an issue processing your payment. Please try again or contact support if the problem persists. @endif

@php // Prioritize additionalPayment if it exists, otherwise use shipmentPayment $payment = $additionalPayment ?? $shipmentPayment ?? null; @endphp @if($payment)

Payment Details:

Tracking Number: {{ $payment->tracking_number ?? 'N/A' }}

Amount: ₹ {{ number_format($payment->amount ?? 0, 2) }}

@if($payment->suite_number)

Suite Number: {{ $payment->suite_number }}

@endif @if(isset($additionalPayment) && $additionalPayment)

Payment Type: Additional Charge

@endif
@endif
@if($isAuthenticated ?? false) View Shipments Go to Dashboard @else

Please log in to view your shipment details and retry payment.

Login to View Shipments @endif
@endif
@endsection