@extends('layouts.admin') @section('title', $payment->reference) @section('content')
Back to payments

{{ $payment->formattedAmount() }}

{{ $payment->status->label() }} {{ $payment->reference }} {{ $payment->created_at->format('d M Y, H:i') }}

The payment

@foreach ([ 'Seller' => $payment->user?->name.' ('.$payment->user?->email.')', 'Method' => str_replace('_', ' ', $payment->gateway), 'Gateway reference' => $payment->gateway_reference ?: '—', 'Paid' => $payment->paid_at?->format('d M Y, H:i') ?? 'Not yet', 'For' => $payment->payable instanceof \App\Models\Subscription ? $payment->payable->plan?->name.' subscription' : ($payment->payable instanceof \App\Models\ListingPromotion ? $payment->payable->type->label().' — '.$payment->payable->listing?->title : '—'), 'Invoice' => $payment->invoice?->number ?? 'Not issued', ] as $label => $value)
{{ $label }}
{{ $value }}
@endforeach
@if ($payment->failure_reason)

{{ $payment->failure_reason }}

@endif
@if ($payment->refunds->isNotEmpty())

Refunds

    @foreach ($payment->refunds as $refund)
  • {{ $payment->currency }} {{ number_format($refund->amount / 100, 2) }} {{ $refund->isCompleted() ? 'Paid out' : 'Awaiting transfer' }}

    {{ $refund->reason }}

    {{ $refund->created_at->format('d M Y') }} @if ($refund->actor) · {{ $refund->actor->name }} @endif

    @unless ($refund->isCompleted())
    @csrf
    @endunless
  • @endforeach
@endif
@if ($payment->status->isOpen()) {{-- The one manual step a bank transfer needs. Settling here is what activates the plan or promotion behind it. --}}

Reconcile

@csrf
@csrf
@endif @if ($payment->refundableAmount() > 0 && $payment->paid_at)

Refund

{{ $payment->currency }} {{ number_format($payment->refundableAmount() / 100, 2) }} left

@csrf
@endif
@endsection