@extends('layouts.school') @section('title', 'Online Payments') @section('header', 'Online Payments') @section('content')
@if (!$active)
No gateway is active. Parents can still claim bank transfers and staff can record cash payments in the office. Configure and activate a provider below to let parents pay invoices online.
@if (!empty(array_filter($platformConfigured)))
Some platform payment keys are configured. You can enable the Pishon gateway per provider to start accepting online payments immediately, or enter your own merchant keys.
@endif @else
{{ ucfirst($active->provider) }} is the active gateway ({{ $active->mode }} mode) for online fee payments.
@endif @if (!$onlineEnabled)
"Enable online payments in the parent portal" is currently off in Finance Settings.
@endif @foreach ($providers as $provider) @php($config = $configs->firstWhere('provider', $provider))

{{ ucfirst($provider) }}

@if ($config && $config->isPishonMode()) Pishon gateway · {{ $config->mode }} mode @if ($config->is_active) · Active @else · @endif @elseif ($config) {{ $config->mode }} mode · Own keys @if ($config->is_active) · Active @else · @endif @else Not configured @endif

@if ($config && $config->isPishonMode()) Pishon gateway @elseif ($config && $config->hasCredentials()) Keys saved @endif
@if ($config && $config->isPishonMode())

This provider is managed by Pishon.

Payments run through the platform gateway and are settled to your default settlement profile. No keys are stored on this school.

Webhook URL to register with {{ ucfirst($provider) }} (if not already set): {{ url('/api/webhooks/payments/' . $provider) }}

@if (!$hasSettlementProfile) Add a settlement profile so payouts reach your bank account. @else Manage settlement profile @endif
@if ($config->is_active)
@csrf @method('PATCH')
@endif
@else
@csrf
@if ($config && $config->hasCredentials())

Current key: {{ $config->maskedSecret() }} — saved encrypted.

@endif

Webhook URL to register with {{ ucfirst($provider) }}: {{ url('/api/webhooks/payments/' . $provider) }} @if ($config && filled($config->webhook_secret)) · webhook secret saved @else · set a webhook secret to receive payment confirmations @endif (signature-verified and idempotent).

@if ($config && $config->hasCredentials())
Verifies your saved {{ ucfirst($provider) }} keys.
@endif

Prefer Pishon to handle this for you?

@csrf
@if (!$hasSettlementProfile) Add a settlement profile first @endif
@unless ($platformConfigured[$provider] ?? false)

The platform gateway isn't configured yet — use your own keys for now.

@endunless
@endif
@endforeach
@endsection @push('scripts') @endpush