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

Period and unit are always default in case of SIDN domain

Open micheldeking opened this issue 3 years ago • 1 comments
trafficstars

When I retrieve domaininfo I get this as a result from $dom->getDomain(): private periodunit -> string (1) "y" private period -> integer 1

The same when I use $dom->getDomain()->getPeriod() In de epp debug log there is this: sidn-ext-epp:ext sidn-ext-epp:infData sidn-ext-epp:domain sidn-ext-epp:optOutfalse</sidn-ext-epp:optOut> sidn-ext-epp:limitedfalse</sidn-ext-epp:limited> <sidn-ext-epp:period unit="m">3</sidn-ext-epp:period> <sidn-ext-epp:scheduledDeleteDate xsi:nil="true"></sidn-ext-epp:scheduledDeleteDate> </sidn-ext-epp:domain> </sidn-ext-epp:infData> </sidn-ext-epp:ext>

Can someone point me in the right direction what to change to get this working ;-) (i have the latest version)

micheldeking avatar Apr 27 '22 19:04 micheldeking

There are 2 periods in the EPP implementation.

There is the default period that EPP supports, which can be 1-10 years. No months possible.

And there is the EPP extension of SIDN, that supports 1 month, 3 months and 12 months.

To retrieve this field, you need to use the SIDN EPP extension, not the default getDomain()->getPeriod function.

So use sidnEppInfoDomainRequest to get the correct domain info with the SIDN extension in it, and use sidnEppInfoDomainResponse->getDomainPeriod() to get the period out of the SIDN extended fields.

metaregistrar avatar Apr 28 '22 07:04 metaregistrar