Update epp.php

This commit is contained in:
Pinga 2023-07-13 11:55:10 +03:00 committed by GitHub
parent ff7945987c
commit 86f070da21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

18
epp.php
View file

@ -357,12 +357,30 @@ class Registrar_Adapter_EPP extends Registrar_AdapterAbstract
$exDate = (string)$r->exDate;
$eppcode = (string)$r->authInfo->pw;
$status = array();
$i = 0;
foreach ($r->status as $e) {
$i++;
$status[$i] = (string)$e->attributes()->s;
}
$ns = array();
$i = 0;
foreach ($r->ns->hostObj as $hostObj) {
$i++;
$ns[$i] = (string)$hostObj;
}
$crDate = strtotime($crDate);
$exDate = strtotime($exDate);
$domain->setRegistrationTime($crDate);
$domain->setExpirationTime($exDate);
$domain->setEpp($eppcode);
$domain->setNs1(isset($ns[0]) ? $ns[0] : '');
$domain->setNs2(isset($ns[1]) ? $ns[1] : '');
$domain->setNs3(isset($ns[2]) ? $ns[2] : '');
$domain->setNs4(isset($ns[3]) ? $ns[3] : '');
}
catch(exception $e) {