Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

companyType seems to have become a required field #8

Closed
websmurf opened this issue Jan 19, 2017 · 19 comments
Closed

companyType seems to have become a required field #8

websmurf opened this issue Jan 19, 2017 · 19 comments

Comments

@websmurf
Copy link

Hi Hidde

Thanks for your library, makes handling the Transip API a bit easier.

The companyType property seems to have become a required field for a WhoisContact. I'm getting the following error if I don't add it to a contact:

SOAP-ERROR: Encoding: object has no 'companyType' property

If I add it to the contact object manually, it works:

        $contact              = new WhoisContact();
        $contact->type        = WhoisContact::TYPE_TECHNICAL;
        $contact->companyName = 'Bandhosting.nl';
        $contact->companyType = ''; # this is new
        $contact->firstName   = 'Adam';
        $contact->lastName    = 'van Dongen';
        $contact->street      = 'Slijpsteen';
        $contact->number      = 8;
        $contact->postalCode  = '4906 LP';
        $contact->city        = 'Oosterhout';
        $contact->country     = 'NL';
        $contact->phoneNumber = '+31652411220';
        $contact->email       = 'adam@bandhosting.nl';
        $contacts[]           = $contact;

It seem to be missing from the Model definition as well although there is a variable $possibleCompanyTypes in there.

@websmurf
Copy link
Author

Running into another thing after adding the companyType attribute.
Now I'm getting this error:

Invalid API signature, signature does not match the request.

Which seems a bit odd since the getInfo request seems to work fine with the same key.
Any idea what that could be?

@hiddeco
Copy link
Owner

hiddeco commented Jan 19, 2017

Yelp, that's not what it's supposed to do. I'll push a fix later today.

Can you please provide me the whole structure you're trying to pass to the API for the second issue?

@petericebear
Copy link
Contributor

What I suggest is setting the companyType to 'ANDERS' when company name is set. Then there should be no problems setting the Whois data.

@hiddeco
Copy link
Owner

hiddeco commented Jan 19, 2017

@petericebear shouldn't it officially be EENMANSZAAK as Bandhosting.nl is a sole trader?

@websmurf
Copy link
Author

Will try that once im back behind my pc. I wonder where the business type is needed anyway, since you cant enter it through the CP of TransIp anyway

@hiddeco
Copy link
Owner

hiddeco commented Jan 19, 2017

I just released version 5.3.2 which adds the missing companyType property.

@petericebear
Copy link
Contributor

TransIP does not use it anymore on the customers.

@websmurf
Copy link
Author

Thanks! Will try it out somewhere in the weekend 😄

@websmurf
Copy link
Author

Sorry, took me a bit longer to update. Could you also update the laravel-transip package to reflect the new version? It's requiring 5.3 of the transip package, not 5.3.*

@websmurf
Copy link
Author

websmurf commented Jan 26, 2017

Have manually tried your fix, and that resolves the initial error I had.
In regards to the API signature error, this is my call to the transip function:

TransIP::domain()->setContacts('bandhosting.nl', $contacts);

Where contacts is:

Array
(
    [0] => TransIP\Model\WhoisContact Object
        (
            [type] => registrant
            [firstName] => AAL
            [middleName] => 
            [lastName] => van Dongen
            [companyName] => Bandhosting.nl
            [companyType] => 
            [companyKvk] => 
            [street] => Zeggeweg
            [number] => 6
            [postalCode] => 4924 EC
            [city] => Drimmelen
            [phoneNumber] => +31 652411220
            [faxNumber] => 
            [email] => adam@bandhosting.nl
            [country] => nl
        )

    [1] => TransIP\Model\WhoisContact Object
        (
            [type] => administrative
            [firstName] => AAL
            [middleName] => 
            [lastName] => van Dongen
            [companyName] => Bandhosting.nl
            [companyType] => 
            [companyKvk] => 
            [street] => Zeggeweg
            [number] => 6
            [postalCode] => 4924 EC
            [city] => Drimmelen
            [phoneNumber] => +31 652411220
            [faxNumber] => 
            [email] => adam@bandhosting.nl
            [country] => nl
        )

    [2] => TransIP\Model\WhoisContact Object
        (
            [type] => technical
            [firstName] => Adam
            [middleName] => 
            [lastName] => van Dongen
            [companyName] => Bandhosting.nl
            [companyType] => 
            [companyKvk] => 
            [street] => Slijpsteen
            [number] => 8
            [postalCode] => 4906 LP
            [city] => Oosterhout
            [phoneNumber] => +31652411220
            [faxNumber] => 
            [email] => adam@bandhosting.nl
            [country] => NL
        )

)

I have double checked that in my config/transip.php file, the main connection mode has been set to readwrite

@websmurf
Copy link
Author

For your informatie, the setDnsEntries does work, also i've tried splitting up the contact and owner and update the registrant through the setOwner method, that resulted in the same error

@hiddeco
Copy link
Owner

hiddeco commented Jan 26, 2017

@websmurf in your example, is companyType an empty string or a null value?

@websmurf
Copy link
Author

It's an empty string

@hiddeco
Copy link
Owner

hiddeco commented Jan 26, 2017

@websmurf and if you try passing one of the WhoisContact::$possibleCompanyTypes values?

@websmurf
Copy link
Author

websmurf commented Jan 26, 2017

Same error I'm afraid. Btw, empty string is one of the allowed $possibleCompanyTypes values
I must say that I'm using the 5.3. package since laravel-transip requires that version and a composer update isn't possible due to resolution errors

I've applied the change in the model for companyType manually, but I don't know if there are changes in 5.3.1 that might resolve this issue?

@hiddeco
Copy link
Owner

hiddeco commented Jan 26, 2017

@websmurf please check if the issue is resolved with the property ordering change in 3a71d28.

Instead of throwing an Uncaught SoapFault exception: [204] Invalid API signature, signature does not match the request. it gives me

Uncaught SoapFault exception: [302] There seems to be a problem with your administrative contact:
 - Je hebt een ongeldig telefoonnummer ingevuld.

which should be a good sign.

@websmurf
Copy link
Author

Yep, with that change applied, it works as expected.
Thanks!

Have created a pull request for laravel-transip to bump for the correct version number in the composer.json file. See here: hiddeco/laravel-transip#6

@hiddeco
Copy link
Owner

hiddeco commented Jan 27, 2017

@websmurf thanks for your contribution, version 5.3.3 has been tagged and released and your PR has been merged and is available under hiddeco/laravel-transip version 5.3.2

@websmurf
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants