metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
214 stars 159 forks source link

extURI for OpenProvider is not correct #324

Closed davey013 closed 2 years ago

davey013 commented 2 years ago

The extURI for the OpenProvider extension, as defined in /Protocols/EPP/eppExtenstions/opprov-1.0/includes.php is not working:

http://www.openprovider.nl/epp/xml/opprov-1.0

It throws a 404.

metaregistrar commented 2 years ago

I have tested the openprovider connection, and it seems to work fine.

Please find here my test script:

require('autoloader.php');

try {
    $op = new \Metaregistrar\EPP\openproviderEppConnection();
    $op->setHostname('epp.openprovider.eu');
    $op->setport(443);
    $op->setUsername('');
    $op->setPassword('');

    if ($op->connect()) {
        if ($op->login()) {
            echo "Logged in\n";
            $op->logout();
        }
    }
} catch (\Metaregistrar\EPP\eppException $e) {
    echo $e->getMessage()."\n\n";
}
davey013 commented 2 years ago

Well, it works fine until I need to do a transfer request:

new eppTransferRequest(...)

The request (as seen in the EPP documentation here: https://doc.openprovider.eu/EPP_Index) needs to have:

<extension>
      <op:ext>
        <op:transfer>
          <op:domain>
            <op:registrant>FL902042-US</op:registrant>
            <op:contact type="admin">FL902042-US</op:contact>
            <op:contact type="tech">FL902042-US</op:contact>
            <op:ns>
              <domain:hostAttr>
                <domain:hostName>ns1.example.de</domain:hostName>
                <domain:hostAddr ip="v6">2607:f0d0:1002:51::4</domain:hostAddr>
              </domain:hostAttr>
              <domain:hostAttr>
                <domain:hostName>ns2.example.de</domain:hostName>
                <domain:hostAddr ip="v4">123.123.123.123</domain:hostAddr>
              </domain:hostAttr>
            </op:ns>
            <op:autorenew>on</op:autorenew>
            <op:nsGroup></op:nsGroup>
            <op:useDomicile>true</op:useDomicile>
            <op:comments>ANY COMMENT  HERE</op:comments>
            <op:promoCode>PROMOCODE</op:promoCode>
            <op:nsTemplateName></op:nsTemplateName>
          </op:domain>
        </op:transfer>
      </op:ext>
    </extension>

Which is missing entirely now. The op:registrant is mandatory for example. So I can't transfer domains at this moment for OpenProvider through EPP, because the whole <extension> part is missing in the transfer request.

I wanted to add it myself by adding the extra elements myself using:

$request = new eppTransferRequest(eppTransferRequest::OPERATION_REQUEST, $domain);
$op_el_extension = $request->createElement('op:ex');
$request->getExtension()->appendChild($op_el_extension);

But I get the following error: Error 2001: Command syntax error (Element '{urn:ietf:params:xml:ns:epp-1.0}extension': This element is not expected.

I think because the XML definition (http://www.openprovider.nl/epp/xml/opprov-1.0) is not working.