diff --git a/modules/registrars/cozaepp/cozaepp.php b/modules/registrars/cozaepp/cozaepp.php index 0c9fd5b12edd6e5e9e4b020a90a6fd683aa7cb17..ce587f8f32bb22ecfdcb9b781c76f53701bf0413 100644 --- a/modules/registrars/cozaepp/cozaepp.php +++ b/modules/registrars/cozaepp/cozaepp.php @@ -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> ');