metaregistrar / php-epp-client

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

Two errors for the noridEppContact class #133

Closed sfenne closed 6 years ago

sfenne commented 6 years ago

Hi,

first error seems like a typo, which always throws an eppException "Invalid contact type specified" in file noridEppContact.php:37

Line 36: if ($extType !== self::NO_CONTACT_TYPE_ORGANIZATION || $extType !== self::NO_CONTACT_TYPE_PERSON || $extType !== self::NO_CONTACT_TYPE_ROLE) {

Should be if ($extType !== self::NO_CONTACT_TYPE_ORGANIZATION && $extType !== self::NO_CONTACT_TYPE_PERSON && $extType !== self::NO_CONTACT_TYPE_ROLE) {

Given that the above is OK, I get this exception when running the request:

No valid response class found for request class Metaregistrar\EPP\noridEppCreateContactRequest

Thanks

metaregistrar commented 6 years ago

The connection between the request noridEppCreateContactRequest and the response noridEppCreateContactResponse can be found in line 14 of Protocols/EPP/eppExtensions/no-ext-contact-1.0/includes.php

If this line is not executed, it seems that this include file was not processed.

Normally, you would process this file by stating parent::useExtension('no-ext-contact-1.0'); in noridEppConnection/eppConnection.php

This 'useExtension' command should make sure the include file was included or else give an error. Can you check if you are using this extension?

metaregistrar commented 6 years ago

I have changed the line , including some parentheses so we are sure it is processed correctly by PHP

if (($extType !== self::NO_CONTACT_TYPE_ORGANIZATION) && ($extType !== self::NO_CONTACT_TYPE_PERSON) && ($extType !== self::NO_CONTACT_TYPE_ROLE))

sfenne commented 6 years ago

I'm overwhelmed by the quick response time! Including the no-ext-contact-1.0 extension did the trick.

Thank you so much!

metaregistrar commented 6 years ago

All in a days work ;-)