php-epp-client icon indicating copy to clipboard operation
php-epp-client copied to clipboard

How to SIDN ScheduleDelete and Remote ScheduleDelete?

Open ispweb opened this issue 1 year ago • 5 comments
trafficstars

I'm looking on how to let domains expire at a given datetime, this can be done though the web application, but i want to automate it.

How can i set the expire date or remove it?

Looking in the EPP manual this should be possible, but i have little experience with changing the php-epp-client extensions.

Can someone help me?

ispweb avatar Jan 12 '24 14:01 ispweb

I had found the euridEppDeleteDomainRequest and tried to modify it to SIDN but did't got it to work.

ispweb avatar Jan 12 '24 14:01 ispweb

I have everything working now, but the only thing i don't get is how to set the domain expire with the right time. The documentation say to use format '2030-01-01T08:37:45.000Z' but that doesn't work. When i only use the date then the expire date get set, with time current time.

ispweb avatar Jan 14 '24 13:01 ispweb

public function addExpireDate($expiredate)
{
    $expiredate=new DateTime($expiredate);
    $expiredate=gmdate('Y-m-d\TH:i:s.000\Z', $expiredate->format('U'));
    // $this->expireDate = $expiredate;
    $this->expireDate = date("Y-m-d",strtotime($expiredate));
}

Expiredate format "Y-m-d" is working on ScheduledDelete but "Y-m-d\TH:i:s.000\Z" give an error? How can we set expiredate with time?

ispweb avatar Jan 14 '24 19:01 ispweb

After contacting SIDN today, they said that only date is possible with ScheduledDelete condition setDate.

ispweb avatar Jan 15 '24 15:01 ispweb

This would be a great addition to the library.

kovoks avatar Feb 13 '24 11:02 kovoks