/** * Get EPP code/token * * @param mixed $domain Domain name * * @return null|string|bool */ public function getToken($domain) { if (!$this->_checkLogin()) { return false; } try { $this->odr->getDomainAuthCode($domain); } catch (Api_Odr_Exception $e) { $this->Error[] = $e->getMessage(); return false; } $result = $this->odr->getResult(); if ($result['status'] !== Api_Odr::STATUS_SUCCESS) { return $this->parseError($result['response']); } return empty($result['response']['auth_code']) ? null : $result['response']['auth_code']; }