metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
209 stars 153 forks source link

How to SIDN ScheduleDelete and Remote ScheduleDelete? #375

Closed ispweb closed 1 month ago

ispweb commented 5 months ago

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 commented 5 months ago

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

ispweb commented 5 months ago

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 commented 5 months ago
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 commented 5 months ago

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

kovoks commented 4 months ago

This would be a great addition to the library.