integrationCode = $integrationCode; } /** * Get the headers for Telepagos integration. * * @return array * @throws Exception */ public function getHeaders(): array { if (!$this->tenantIntegration) { throw new Exception("Tenant integration is not loaded. Call forTenant() first."); } $username = $this->getIntegrationSetting('username'); $password = $this->getIntegrationSetting('password'); if (empty($username) || empty($password)) { throw new Exception("Missing username or password in Telepagos integration settings."); } return [ 'Authorization' => 'Basic ' . base64_encode($username . ':' . $password), 'Content-Type' => 'application/json', 'Accept' => 'application/json', ]; } }