function CreateDomain(Domain $domain, $period, $extra = array()) { $Ret = parent::CreateDomain($domain, $period, $extra); if ($Ret->Succeed()) { // Request SIDN for generated auth token $Grd = $this->GetRemoteDomain($domain); $Ret->AuthCode = $Grd->AuthCode; } return $Ret; }
public function CreateDomain(Domain $domain, $period, $extra = array()) { $resp = parent::CreateDomain($domain, 1, $extra); if ($resp->Succeed()) { // DNSBE is an autorenew registry, // To set expiration date send schedulled delete command $expire_date = strtotime("+{$period} year"); $this->DeleteDomain($domain, $expire_date); $resp->ExpireDate = $expire_date; } return $resp; }
function createDomainWithMaxLengthName() { $Domain = $this->Registry->NewDomainInstance(); $Domain->Name = 'eppabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh'; $Domain->SetNameserverList($this->NSList); $Domain->SetContact($this->C2, CONTACT_TYPE::REGISTRANT); $Domain->SetContact($this->C3, CONTACT_TYPE::ADMIN); $Domain->SetContact($this->C4, CONTACT_TYPE::BILLING); $Domain->SetContact($this->C5, CONTACT_TYPE::TECH); $Domain->AuthCode = 'my secret'; $Resp = $this->Module->CreateDomain($Domain, null); $this->assertTrue($Resp->Code == RFC3730_RESULT_CODE::OK, "Create Domain with Maximum Length Domain Name"); }