From 1313374fa7855ab1ad5ffd2d6ae1f2b8b80cffc7 Mon Sep 17 00:00:00 2001 From: bHosted <50988060+mvdgeijn@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:05:19 +0200 Subject: [PATCH 1/2] Create sidnEppCancelDeleteRequest.php added sidn domainCancelDelete extension command --- .../sidnEppCancelDeleteRequest.php | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/eppRequests/sidnEppCancelDeleteRequest.php diff --git a/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/eppRequests/sidnEppCancelDeleteRequest.php b/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/eppRequests/sidnEppCancelDeleteRequest.php new file mode 100644 index 00000000..5cdab5cf --- /dev/null +++ b/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/eppRequests/sidnEppCancelDeleteRequest.php @@ -0,0 +1,53 @@ + [1], + 'm' => [1,3,12] + ]; + + function __construct($domain, string $unit, int $period) { + if( ! isset( $this->units[$unit] ) ) { + throw new sidnEppException('invalid unit ' . $unit . ' specified' ); + } + + if( ! in_array( $period, $this->units[$unit] ) ) { + throw new sidnEppException('invalid period ' . $period . ' for unit ' . $unit . ' specified' ); + } + + parent::__construct(); + + $this->setNamespacesinroot( false ); + + if ($domain instanceof eppDomain) { + $this->addSidnExtension( $domain, $unit, $period ); + } + } + + private function addSidnExtension(eppDomain $domain, $unit, $period) { + $extension = $this->createElement('extension'); + + $sidncommand = $this->createElement('sidn-ext-epp:command'); + $sidncommand->setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + $sidncommand->setAttribute("xmlns:sidn-ext-epp", "http://rxsd.domain-registry.nl/sidn-ext-epp-1.0"); + + $cancelDelete = $this->createElement('sidn-ext-epp:domainCancelDelete'); + + $cancelDelete->appendChild( $this->createElement('sidn-ext-epp:name', $domain->getDomainname() ) ); + + $periodElement = $this->createElement('sidn-ext-epp:period', $period ); + $periodElement->setAttribute('unit', $unit ); + $cancelDelete->appendChild( $periodElement ); + + $sidncommand->appendChild($cancelDelete); + + $sidncommand->appendChild( $this->appendChild($this->createElement('sidn-ext-epp:clTRID', $this->sessionid) ) ); + + $extension->appendChild( $sidncommand); + + $this->getEpp()->appendChild($extension); + $this->getEpp()->setAttribute("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance" ); + } + +} From ac5a3767876a6803660d903f0d67ff4f06302105 Mon Sep 17 00:00:00 2001 From: bHosted <50988060+mvdgeijn@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:07:13 +0200 Subject: [PATCH 2/2] added CancelDelete command for SIDN extension Added the CancelDelete command for the SIDN extension --- Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/includes.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/includes.php b/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/includes.php index 8746fdb4..24572f8a 100644 --- a/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/includes.php +++ b/Protocols/EPP/eppExtensions/sidn-ext-epp-1.0/includes.php @@ -26,5 +26,8 @@ include_once(dirname(__FILE__) . '/eppResponses/sidnEppInfoDomainResponse.php'); $this->addCommandResponse('Metaregistrar\EPP\sidnEppInfoDomainRequest', 'Metaregistrar\EPP\sidnEppInfoDomainResponse'); +include_once(dirname(__FILE__) . '/eppRequests/sidnEppCancelDeleteRequest.php'); +$this->addCommandResponse('Metaregistrar\EPP\sidnEppCancelDeleteRequest', 'Metaregistrar\EPP\eppResponse'); + include_once(dirname(__FILE__) . '/eppExceptions/sidnEppException.php'); $this->addException('Metaregistrar\EPP\sidnEppException');