Closed kg00 closed 8 years ago
Have you used the class iisEppCreateContactRequest instead of the regular eppCreateContactRequest?
IIS have some special contact requirements, like the organisation number and vat number that must be added.
I will try to recreate your problem using our own IIS epp connection.
Yes, we use iisEppCreateContactRequest The problem is not the orgno or the vatno. It is the format of the contact id. Created a simple function to create a correct format (although not using contact:org or contact:name but insted random first 6). This works, but I do not know how to add it. For now I have just added it in generateContactId in eppContact.php "hard-coded" in order to test and it works fine.
`// Create contactid with 6 random letters, year (yy) month (mm) - and number of seconds since midnight (if less than 10000, add 0 before to have 5 numbers)
private function create_contact_id_iis() {
$charset = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
$contact_id = substr(str_shuffle($charset), 0, 6) . date("ym") . "-" . str_pad((time() - strtotime("today")), 5, '0', STR_PAD_LEFT);
return $contact_id;
}`
A comment about the iis recommended format: If you go for the recommended format with the contact id starting with "First 6 characters of contact:org/ or contact:name/ " you have to be aware that there might be non-ascii characters in contact:org and contact:name. Those will not be accepted as part of the contact id. We have solved this by replacing those non-ascii with "z" Also situations where contact:org or contact:name is less than 6 characters has to be considered. We have added "x" to those to get 6 characters.
I have added your contact generating function to iisEppCreateContactRequest.php, this overwrites the standard contact:id with the generated one. Please check if this works for you. The EPP output i get looks fine
<?xml version="1.0" encoding="UTF-8"?>
<epp xmlns:iis="urn:se:iis:xml:epp:iis-1.2">
<command>
<create>
<contact:create>
<contact:id>owsfri1603-35846</contact:id>
....
Works fine. Thank you.
Last update: i have made contact:id creation more fancy by using the name/organization of the contact and applying your comment to remove spaces, non-ascii and padding to 6 chars.
Adding a contact doesn't work for iis. Gives Error 2004. The iis registry (.se) has the following requirements for the contact id:
How/where can this be added?
//kg00