Skip to content
Snippets Groups Projects
Commit cdc5d0ec authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Added basic function to ack a poll message

parent 5196079f
No related branches found
No related tags found
No related merge requests found
......@@ -790,6 +790,34 @@ function _cozaepp_message($code) {
}
# Ack a POLL message
function _cozaepp_ackpoll($client,$msgid) {
# Ack poll message
$output = $client->request('
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<poll op="ack" msgID="'.$id.'"/>
</command>
</epp>
');
# Check for error
if (PEAR::isError($output)) {
return $output;
}
# Decipher XML
$doc = new DOMDocument();
$doc->loadXML($output);
$coderes = $doc->getElementsByTagName('result')->item(0)->getAttribute('code');
# Check result
if($coderes != '1301') {
return new PEAR_Error("Failed to ACK message $msgid");
}
}
# Function to create internal COZA EPP request
function _cozaepp_Client() {
# Setup include dir
......@@ -840,7 +868,6 @@ function _cozaepp_Client() {
<objURI>urn:ietf:params:xml:ns:contact-1.0</objURI>
</svcs>
</login>
<clTRID>RAR-LOGIN-0000001</clTRID>
</command>
</epp>
');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment