riskLevel === 'highest' || $this->riskLevel === 'elevated'; } /** * Check if fraud detection was performed. */ public function wasAssessed(): bool { return $this->riskLevel !== 'not_assessed'; } /** * Get a human-readable risk description. */ public function getRiskDescription(): string { return match ($this->riskLevel) { 'highest' => 'Very High Risk - Payment appears fraudulent', 'elevated' => 'Elevated Risk - Payment requires review', 'normal' => 'Normal Risk - Payment appears legitimate', 'not_assessed' => 'Not Assessed - Fraud detection disabled', default => 'Unknown Risk Level', }; } /** * Convert to array for storage/logging. */ public function toArray(): array { return [ 'risk_level' => $this->riskLevel, 'signals' => $this->signals, 'source' => $this->source, 'stripe_risk_score' => $this->stripeRiskScore, 'should_block' => $this->shouldBlock, 'should_review' => $this->shouldReview, ]; } }