Skip to content

Commit 07fb98f

Browse files
Merge pull request #414 from santhapa/rrpproxy-get-contact-verify-status-in-info-reponse
added rrpproxy ext response to get contact verified/validation in contact info…
2 parents c19d0fb + 1b77a17 commit 07fb98f

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
namespace Metaregistrar\EPP;
3+
4+
/*
5+
* <extension>
6+
<keysys:resData xmlns:keysys="http://www.key-systems.net/epp/keysys-1.0">
7+
<keysys:contactInfData>
8+
<keysys:validated>1</keysys:validated>
9+
<keysys:verified>1</keysys:verified>
10+
</keysys:contactInfData>
11+
</keysys:resData>
12+
</extension>
13+
*/
14+
15+
class rrpproxyEppInfoContactResponse extends eppInfoContactResponse {
16+
function __construct() {
17+
parent::__construct();
18+
}
19+
20+
21+
/**
22+
*
23+
* @return bool|null
24+
*/
25+
public function getValidated() {
26+
$xpath = $this->xPath();
27+
$result = $xpath->query('/epp:epp/epp:response/epp:extension/keysys:resData/keysys:contactInfData/keysys:validated');
28+
if ($result->length > 0) {
29+
return $result->item(0)->nodeValue == '1' ? true : false;
30+
} else {
31+
return null;
32+
}
33+
}
34+
35+
/**
36+
*
37+
* @return bool|null
38+
*/
39+
public function getVerified() {
40+
$xpath = $this->xPath();
41+
$result = $xpath->query('/epp:epp/epp:response/epp:extension/keysys:resData/keysys:contactInfData/keysys:verified');
42+
if ($result->length > 0) {
43+
return $result->item(0)->nodeValue == '1' ? true : false;
44+
} else {
45+
return null;
46+
}
47+
}
48+
}
49+

Protocols/EPP/eppExtensions/keysys-1.0/includes.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@
1414
$this->addCommandResponse('Metaregistrar\EPP\rrpproxyEppRenewalmodeRequest', 'Metaregistrar\EPP\eppUpdateDomainResponse');
1515

1616
include_once(dirname(__FILE__) . '/eppRequests/rrpproxyEppTransferDomainRequest.php');
17-
$this->addCommandResponse('Metaregistrar\EPP\rrpproxyEppTransferDomainRequest', 'Metaregistrar\EPP\eppTransferResponse');
17+
$this->addCommandResponse('Metaregistrar\EPP\rrpproxyEppTransferDomainRequest', 'Metaregistrar\EPP\eppTransferResponse');
18+
19+
include_once(dirname(__FILE__) . '/eppResponses/rrpproxyEppInfoContactResponse.php');
20+
$this->addCommandResponse('Metaregistrar\EPP\eppInfoContactRequest', 'Metaregistrar\EPP\rrpproxyEppInfoContactResponse');

0 commit comments

Comments
 (0)