currency->getUsdToGhsRate(); } public function getEurToGhs(): float { return $this->currency->getEurToGhsRate(); } public function fetchLiveRate(): float { return $this->currency->refreshRate(); } public function refreshRate(): float { return $this->currency->refreshRate(); } public function getCachedRate(): ?float { $info = $this->currency->getRateInfo(); return ($info['cached'] ?? false) ? (float) ($info['rate'] ?? 0) : null; } public function getRateInfo(): array { $info = $this->currency->getRateInfo(); return [ 'rate' => (float) ($info['rate'] ?? 0), 'is_cached' => (bool) ($info['cached'] ?? false), 'fallback_rate' => (float) ($info['fallback'] ?? config('hosting.pricing.fallback_usd_to_ghs_rate', 15.50)), ]; } }