@extends('layouts.subscriptions') @push('style') @endpush @section('content') @php $periodStart = $subscription->starts_at ?? now(); $periodEnd = $subscription->ends_at ?? $periodStart->copy()->addDays(30); $maxSlots = max((int) $subscription->available_slots, 1); $initialSlots = min(max((int) old('slots_taken', 1), 1), $maxSlots); $monthlyPrice = (float) $subscription->price_per_slot * $initialSlots; $platformFee = 0.64 * $initialSlots; $totalPayable = $monthlyPrice + $platformFee; $strikedPrice = (float) $subscription->total_price; $availableBalance = (float) (auth()->user()?->balance ?? 0); $hasSufficientBalance = $availableBalance >= $totalPayable; @endphp

{{ $subscription->service->name }} {{ $subscription->servicePlan->name }}

@if($errors->any())
{{ $errors->first() }}
@endif
Monthly
{{ $subscription->credentials_shared ? 'Service access is shared by credentials. After payment, details are available in your subscription panel.' : 'Service access is shared through invitation workflow after the owner approves your request.' }}
{{ $hasSufficientBalance ? 'Your balance is enough. You can continue to payment.' : 'Insufficient balance. You can still review payment details on the next screen.' }}
Available balance: ${{ number_format($availableBalance, 2) }} Admin fee: ${{ number_format($platformFee, 2) }} Total payable: ${{ number_format($totalPayable, 2) }}
Subscription period (30 days):
{{ $periodStart->format('M.d,Y') }}
to
{{ $periodEnd->format('M.d,Y') }}
Number of seats
x {{ $initialSlots }}
Subscription price :
${{ number_format($strikedPrice, 2) }} / month
{{ number_format($monthlyPrice, 2) }} $ / month

You will not be able to join and be charged for a subscription until the owner agrees.

If the user accepts your request, cancellation right may not apply as per policy.

@endsection