public function GetRemoteDomain(Domain $domain) { $resp = parent::GetRemoteDomain($domain); if ($resp->Succeed()) { $infData = $resp->RawResponse->response->resData->children($this->XmlNamespaces['domain']); $infData = $infData[0]; if ($infData) { $resp->TechContact = ""; // Unset 'tech' contact foreach ($infData->contact as $contact) { if ($contact->attributes()->type == "onsite") { $resp->TechContact = (string) $contact; } } } // Billing contact is 1 for the whole .BE module $resp->BillingContact = ""; // Process extension $eppExt = $resp->RawResponse->response->extension->children($this->ExtNamespace); if (count($eppExt) && ($eppExt = $eppExt[0])) { // deleteDate is simply an expiration date in DNSBE if ($delDate = trim("{$eppExt->infData->domain->deletionDate}")) { $resp->ExpireDate = strtotime($delDate); } } } return $resp; }
public function GetRemoteDomain(Domain $domain) { $resp = parent::GetRemoteDomain($domain); if ($resp->Succeed()) { // Billing contact is 1 for the whole .EU module $resp->BillingContact = ""; // Process extension $extData = $resp->RawResponse->response->extension->children($this->ExtDomain); $resp->TechContact = "{$extData->infData->contact}"; } return $resp; }
function GetRemoteDomain(Domain $domain) { $Grd = parent::GetRemoteDomain($domain); if ($Grd->Succeed()) { $info = $Grd->RawResponse->response->resData->children($this->XmlNamespaces['domain']); $info = $info[0]; $up_date = strtotime("{$info->upDate}"); if (!$up_date) { $up_date = $Grd->CreateDate; } $cr_date_gd = getdate($Grd->CreateDate); // Manipulations with create date 'm-d' and current date 'Y' $ex_date = mktime(0, 0, 0, $cr_date_gd["mon"], $cr_date_gd["mday"], date("Y")); if ($ex_date < $up_date) { $ex_date = strtotime("+1 year", $ex_date); } $Grd->ExpireDate = $ex_date; } return $Grd; }
function renewDomain() { $Domain = $this->Registry->NewDomainInstance(); $Domain->Name = 'epprenewable'; // Get expiration date $Grd = $this->Module->GetRemoteDomain($Domain); $Domain->ExpireDate = $Grd->ExpireDate; // Renew domain $Resp = $this->Module->RenewDomain($Domain, array('period' => 5)); $this->assertTrue($Resp->Code == RFC3730_RESULT_CODE::OK && date('Ymd', strtotime("+5 year", $Grd->ExpireDate)) == date('Ymd', $Resp->ExpireDate), "Renew Domain"); $this->renewable_create_date = $Grd->CreateDate; $this->renewable_expire_date = $Resp->ExpireDate; }