@extends('layouts.subscriptions') @push('style') @endpush @section('content') @php $periodStart = $subscription->effective_starts_at; $periodEnd = $subscription->effective_ends_at; $isExpired = (bool) $subscription->is_expired; $maxSlots = max((int) $subscription->remaining_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; $serviceLogo = marketplaceImageUrl($subscription->service?->logo ?: $subscription->service?->category?->image_url); $isYouTube = str_contains(strtolower($subscription->service?->name ?? ''), 'youtube'); $serviceDescription = trim((string) ($subscription->service?->description ?? '')); if ($serviceDescription === '') { $serviceDescription = trim((string) (\App\Models\Service::query() ->where('name', $subscription->service?->name) ->whereNotNull('description') ->where('description', '!=', '') ->value('description') ?? '')); } if ($serviceDescription === '') { $serviceDescription = trim((string) (\App\Models\Service::query() ->where('category_id', $subscription->service?->category_id) ->where(function ($q) use ($subscription) { $name = strtolower(trim((string) ($subscription->service?->name ?? ''))); $q->whereRaw('LOWER(name) = ?', [$name]); }) ->whereNotNull('description') ->where('description', '!=', '') ->value('description') ?? '')); } $planFeatures = trim((string) ($subscription->servicePlan?->features ?? '')); @endphp
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.