diff --git a/ua.php b/ua.php index 83046e0..f1a7a9f 100644 --- a/ua.php +++ b/ua.php @@ -966,6 +966,37 @@ public function getEpp(Registrar_Domain $domain) $r = $this->write($xml, __FUNCTION__); $r = $r->response->resData->children('http://hostmaster.ua/epp/domain-1.1')->infData; $eppcode = (string)$r->authInfo->pw; + +if (empty($eppcode)) { + $eppcode = $this->generateObjectPW(); + $from[] = '/{{ name }}/'; + $to[] = htmlspecialchars($domain->getName()); + $from[] = '/{{ authInfo }}/'; + $to[] = $eppcode; + $from[] = '/{{ clTRID }}/'; + $clTRID = str_replace('.', '', round(microtime(1), 3)); + $to[] = htmlspecialchars($params['registrarprefix'] . '-domain-update-' . $clTRID); + $xml = preg_replace($from, $to, ' + + + + + {{ name }} + + + {{ authInfo }} + + + + + {{ clTRID }} + +'); + $r = $this->write($xml, __FUNCTION__); +} if (!empty($s)) { $this->logout();