@extends('layouts.admin') @section('title', 'B2C Partner') @section('content') @include('admin.b2c-partners._nav') @if($newCredentials)
New {{ $newCredentials['environment'] }} credentials. Hand them to the partner securely; they are not shown again.
Client ID
{{ $newCredentials['client_id'] }}
Client secret
{{ $newCredentials['client_secret'] }}
API key
{{ $newCredentials['api_key'] }}
@endif
{{ $partner->business_name }} {{ $partner->partner_code }}
Edit
@csrf @method('DELETE')
{{ $partner->contact_name }}
{{ $partner->email }}
{{ $partner->phone }}
@if($partner->website_url){{ $partner->website_url }}
@endif {{ $partner->address }}
Commission: {{ $partner->commission_percent }}%
Credit limit: {{ $partner->credit_limit }}
Packages: {{ $partner->package_access === 'selected' ? $partner->packages->count().' selected' : 'All' }}
Approved: {{ $partner->approved_at?->format('d M Y') ?? '—' }} {{ $partner->approver ? 'by '.$partner->approver->name : '' }}
Last portal login: {{ $partner->last_login_at?->diffForHumans() ?? 'never' }}
@if($partner->package_access === 'selected' && $partner->packages->isNotEmpty())
Allowed packages: {{ $partner->packages->pluck('title')->implode(', ') }}
@endif @if($partner->notes)
{{ $partner->notes }}
@endif
@foreach([ ['Live sales', $stats['sales']], ['Sales value', $stats['revenue']], ['Payable to us', $stats['payable']], ['Cancelled', $stats['cancelled']], ['Sandbox bookings', $stats['sandbox']], ['API calls (7d)', $stats['calls_7d'].' / '.$stats['errors_7d'].' err'], ] as [$label, $value])
{{ $label }}
{{ $value }}
@endforeach
Recent bookings
All
@forelse($bookings as $b) @empty @endforelse
VoucherEnvChannelPackageTravelAmountStatusCore booking
{{ $b->voucher_no }} {{ $b->is_sandbox ? 'sandbox' : 'live' }} {{ $b->channel }} {{ $b->package?->title }} {{ $b->travel_date?->format('d M Y') }} {{ $b->amount_confirmed }} @include('b2c.partials.status', ['status' => $b->status]) @if($b->booking_id)#{{ $b->booking_id }}@else — @endif
No bookings yet.
Recent API calls
All
@include('b2c.partials.log-table', ['logs' => $logs, 'showPartner' => false])
Status & access
@csrf @method('PATCH')
live_enabled)>
    @foreach($clients as $env => $client)
  • {{ ucfirst($env) }} API {{ $client->is_active ? 'on' : 'off' }}
    {{ $client->client_id }}
    {{ $client->api_key_prefix ? 'Credentials issued '.$client->secret_rotated_at?->diffForHumans() : 'No credentials issued yet' }} @if($client->webhook_url)
    Webhook: {{ $client->webhook_url }}@endif @if($client->ip_allowlist)
    IPs: {{ implode(', ', $client->ip_allowlist) }}@endif
    @csrf
  • @endforeach
Wallet
Balance{{ $balance }}
Available (incl. credit){{ $available }}
@csrf
@forelse($transactions as $tx) @empty @endforelse
{{ $tx->transaction_date?->format('d M') }} {{ \App\Models\B2cWalletTransaction::CATEGORIES[$tx->category] ?? $tx->category }}
{{ $tx->reference_no }}
{{ $tx->type === 'credit' ? '+' : '−' }}{{ $tx->amount }}
No transactions.
@endsection