php-epp-client
php-epp-client copied to clipboard
Period and unit are always default in case of SIDN domain
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:
Can someone point me in the right direction what to change to get this working ;-) (i have the latest version)
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.