metaregistrar / php-epp-client

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

sidnEppCreateContactReques 2001 error since last week #159

Closed jjclinton closed 5 years ago

jjclinton commented 5 years ago

Hello, last week I encountered an SIDN error 2001 and it's still throwing this error. I try to create a contact with the sidnEppCreateContactRequest($contactinfo) command

My $contactinfo is as follows: $contactinfo = new eppContact(new EppContactPostalInfo($name, $city, $country, $organization, $address, null, $postcode, Metaregistrar\EPP\eppContact::TYPE_LOC), $email, $telephone);

This is in a function called createcontact which is called by: createcontact($conn,'jjay@gmail.com','+31.612413333','jay',null,'Pomme1','7905BA','Amsterdam','NL')

Is there something wrong with this? Thank you in advance.

Kind regards,

Joshua Clinton

metaregistrar commented 5 years ago

What is error 2001? Is there an errortext connected to this error?

jjclinton commented 5 years ago

Command syntax error, but I checked the syntax in the example file and it is exactly the same.

jjclinton commented 5 years ago

Entire error:

in /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-content/plugins/domein-api/php-epp-client/Protocols/EPP/eppResponses/eppResponse.php:228 Stack trace:

0 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-content/plugins/domein-api/php-epp-client/Protocols/EPP/eppConnection.php(462): Metaregistrar\EPP\eppResponse->Success()

1 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-content/plugins/domein-api/registerdomain.php(118): Metaregistrar\EPP\eppConnection->request(Object(Metaregistrar\EPP\sidnEppCreateContactRequest))

2 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-content/plugins/domein-api/registerdomain.php(78): createcontact(Object(Metaregistrar\EPP\sidnEppConnection), 'jjclinton15@gma...', '+31.612413333', 'jay', NULL, 'Pomme 1', '7905BA', 'Amsterdam', 'NL')

3 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-content/plugins/domein-api/domeinapi.php(198): pass_connection(Object(Metaregistrar\EPP\sidnEppConnection), Object(stdClass), Object(stdClass))

4 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-includes/shortcodes.php(319): brisp_domein_registreren('', '', 'brisp_registree...')

5 [internal function]: do_shortcode_tag(Array)

6 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-includes/shortcodes.php(197): preg_replacecallback('/\[(\[?)(brisp...', 'do_shortcode_ta...', '[brisp_registre...')

7 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-includes/class-wp-hook.php(286): do_shortcode('[brisp_registre...')

8 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-includes/plugin.php(203): WP_Hook->apply_filters('[brisp_registre...', Array)

9 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-includes/post-template.php(240): apply_filters('the_content', '[brisp_registre...')

10 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-content/themes/Divi/page.php(45): the_content()

11 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-includes/template-loader.php(74): include('/var/www/vhosts...')

12 /var/www/vhosts/brisp.nl/staging.brisp.nl/wp-blog-header.php(19): require_once('/var/www/vhosts...')

13 /var/www/vhosts/brisp.nl/staging.brisp.nl/index.php(17): require('/var/www/vhosts...')

14 {main} contactinfo:

metaregistrar commented 5 years ago

I will try your code and see what happens on this side.

jjclinton commented 5 years ago

OK thank you very much.

metaregistrar commented 5 years ago

I have no problem running your code. This is my code example, and i get code 1000 (ok)

    $name = 'jay';
    $city = 'Amsterdam';
    $country = 'NL';
    $organization = null;
    $address= 'Pomme1';
    $postcode = '7905BA';
    $telephone = '+31.612413333';
    $email = 'jjay@gmail.com';
    $contactinfo = new Metaregistrar\EPP\eppContact(new Metaregistrar\EPP\EppContactPostalInfo($name, $city, $country, $organization, $address, null, $postcode, Metaregistrar\EPP\eppContact::TYPE_LOC), $email, $telephone);
    $create = new \Metaregistrar\EPP\sidnEppCreateContactRequest($contactinfo);
    $response = $this->conn->request($create);
    $this->assertEquals('1000',$response->getResultCode());
jjclinton commented 5 years ago

Wow that's weird :(. I will try it again, I hope can figure it out. I will let you know once I have.

jjclinton commented 5 years ago

So when I pass in the variables like that it works perfectly, but if I put the exact same values as parameters in the function it starts complaining.

jjclinton commented 5 years ago

I am not sure why, but it works now.. Thanks for your help.