@extends('layouts.app') @section('title', 'Payment Reconciliation') @section('content') @php $providerLabels = [ 'maya_checkout' => 'Maya Checkout / QRPh', 'paymongo_checkout' => 'PayMongo Checkout', 'xendit_payment_session' => 'Xendit Checkout', 'card_terminal' => 'Card terminal', ]; @endphp

Payment Reconciliation

{{ number_format($summary['confirmed_count']) }}

Confirmed payments

{{ $summary['confirmed_amount'] }}

Confirmed amount

{{ $summary['unsettled_amount'] }}

Awaiting settlement

{{ number_format($summary['review_count']) }}

Needs review

Settlement matching

Upload a provider CSV containing a merchant reference or provider reference plus the gross amount. Matching confirmed payments are marked settled; differences are kept for review.

Import provider settlement

{!! Form::open(['route' => 'integrated-payments.import-settlement', 'method' => 'post', 'files' => true]) !!}
{!! Form::label('provider', 'Provider:*') !!} {!! Form::select('provider', $providerLabels, null, ['class' => 'form-control', 'required']) !!}
{!! Form::label('settlement_file', 'Settlement CSV:*') !!} {!! Form::file('settlement_file', ['class' => 'form-control', 'accept' => '.csv,text/csv', 'required']) !!}
Recognized headings include merchant_reference, request_reference_number, provider_reference, provider_payment_id, reference, amount, gross_amount, net_amount, fee, batch_number, and settled_at.
{!! Form::close() !!}

Provider payment attempts

{!! Form::open(['method' => 'get', 'class' => 'row']) !!}
{!! Form::select('provider', ['' => 'All providers'] + $providerLabels, request('provider'), ['class' => 'form-control']) !!}
{!! Form::select('status', ['' => 'All payment statuses', 'paid' => 'Paid', 'pending' => 'Pending', 'processing' => 'Processing', 'failed' => 'Failed', 'cancelled' => 'Cancelled', 'needs_review' => 'Needs review', 'voided' => 'Voided', 'refunded' => 'Refunded'], request('status'), ['class' => 'form-control']) !!}
{!! Form::select('settlement_status', ['' => 'All settlement statuses', 'unsettled' => 'Unsettled', 'settled' => 'Settled', 'mismatch' => 'Mismatch'], request('settlement_status'), ['class' => 'form-control']) !!}
{!! Form::close() !!}
@forelse($attempts as $attempt) @empty @endforelse
DateProvider / channelReferencesLocationAmountPaymentSaleSettlement
{{ optional($attempt->created_at)->format('Y-m-d H:i') }} {{ $providerLabels[$attempt->provider] ?? str_replace('_', ' ', $attempt->provider) }}
{{ str_replace('_', ' ', $attempt->channel) }}
{{ $attempt->merchant_reference }} @if($attempt->provider_reference)
{{ $attempt->provider_reference }}@endif
{{ optional($attempt->location)->name ?: '—' }} {{ $attempt->amount }} {{ str_replace('_', ' ', $attempt->status) }} {{ optional($attempt->transaction)->invoice_no ?: 'Not linked' }} {{ str_replace('_', ' ', $attempt->settlement_status) }} @if(in_array($attempt->status, ['created', 'pending', 'processing'])) {!! Form::open(['route' => ['integrated-payments.sync', $attempt->uuid], 'method' => 'post']) !!} {!! Form::close() !!} @endif
No integrated payment attempts found.
{{ $attempts->links() }}
@endsection