@props([ 'type' => 'service', 'inputId' => 'priceInput', 'quantityInputId' => null, 'initialPrice' => null, 'color' => 'green' ]) @php $commissionRate = \App\Services\CommissionService::ratePercent($type, 'prestataire'); $stripeFeePercent = (float) get_setting('stripe_fee_percent', '1.4'); $stripeFeeFixed = (float) get_setting('stripe_fee_fixed', '0.25'); $colorClasses = [ 'green' => ['bg' => 'from-green-50 to-emerald-50', 'border' => 'border-green-200', 'text' => 'text-green-600', 'highlight' => 'border-green-400'], 'blue' => ['bg' => 'from-blue-50 to-indigo-50', 'border' => 'border-blue-200', 'text' => 'text-blue-600', 'highlight' => 'border-blue-400'], 'orange' => ['bg' => 'from-orange-50 to-amber-50', 'border' => 'border-orange-200', 'text' => 'text-orange-600', 'highlight' => 'border-orange-400'], 'red' => ['bg' => 'from-red-50 to-pink-50', 'border' => 'border-red-200', 'text' => 'text-red-600', 'highlight' => 'border-red-400'], ]; $colors = $colorClasses[$color] ?? $colorClasses['green']; // Calcul initial si prix fourni if ($initialPrice && $initialPrice > 0) { $initialStripeFee = round(($initialPrice * $stripeFeePercent / 100) + $stripeFeeFixed, 2); $initialCommission = round($initialPrice * ($commissionRate / 100), 2); $initialReceive = round($initialPrice - $initialStripeFee - $initialCommission, 2); } else { $initialStripeFee = 0; $initialCommission = 0; $initialReceive = 0; } @endphp
Montant versé après validation par le client Après validation client