metaregistrar / php-epp-client

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

eppCreateContactRequest issues on both Openprovider and Sidn #288

Closed cliffordjames closed 2 years ago

cliffordjames commented 3 years ago

Hi,

I have an issue with creating a contact on Openprovider and Sidn:

I'm trying to create the following contact:

$contact = new eppContact(
    new eppContactPostalInfo(
        $domeinContact->naam,
        $domeinContact->plaatsnaam,
        $domeinContact->land->iso2,
        $domeinContact->bedrijfsnaam,
        $domeinContact->adres,
        $domeinContact->staat_of_provincie,
        $domeinContact->postcode,
    ),
    $domeinContact->email,
    $domeinContact->telefoon
);
$contact->setPassword(null); // password is always set through the constructor of eppContact on line 78

$request = new eppCreateContactRequest($contact);
$response = $this->sendRequest($request, $registry); // $registry is either Openprovider or Sidn

When I execute the code above I get the following error: Error 2003: Required parameter missing (Element '{urn:ietf:params:xml:ns:contact-1.0}create': Missing child element(s). Expected is ( {urn:ietf:params:xml:ns:contact-1.0}authInfo ).)

When I remove the line with $contact->setPassword(null);, I get the following error: Error 2102: Unimplemented option (Contact password is not supported)

Am I doing something wrong?

Thanks in advance!

metaregistrar commented 3 years ago

Hello Clifford,

For SIDN, you should use an sidnEppCreateContactRequest. Because they use specific extensions that the stand eppCreateContactRequest does not create.

cliffordjames commented 3 years ago

Hi,

Thanks for the quick response!

Changing to sidnEppCreateContactRequest gives the following error: Error 2001: Command syntax error

Removing the $contact->setPassword(null); gives the following error: Error 2306: Parameter value policy error

cliffordjames commented 3 years ago

Hi @metaregistrar,

Do you need more info on this issue?