$newContact->companyName = $_POST[$type]['companyName'];
                $newContact->companyKvk = $_POST[$type]['companyKvk'];
                $newContact->companyType = $_POST[$type]['companyType'];
                $newContact->street = $_POST[$type]['street'];
                $newContact->number = $_POST[$type]['number'];
                $newContact->postalCode = $_POST[$type]['postalCode'];
                $newContact->city = $_POST[$type]['city'];
                $newContact->country = $_POST[$type]['country'];
                $newContact->phoneNumber = $_POST[$type]['phoneNumber'];
                $newContact->faxNumber = $_POST[$type]['faxNumber'];
                $newContact->email = $_POST[$type]['email'];
                // Add new contact to the list
                $newContacts[] = $newContact;
            }
            // Set contacts for the domain by using the Transip_DomainService API;
            Transip_DomainService::setContacts($domain, $newContacts);
        }
        // Request the locked status of a domain by using the Transip_DomainService API;
        $info = Transip_DomainService::getInfo($domain);
        // The Transip_Domain object contains an array of Transip_WhoisContact objects
        // Each Transip_WhoisContact object has one of three types
        // Iterate through contacts and save in array
        foreach ($info->contacts as $contact) {
            $contacts[$contact->type] = $contact;
        }
    } catch (SoapFault $e) {
        // It is possible that an error occurs when connecting to the TransIP Soap API,
        // those errors will be thrown as a SoapFault exception.
        $error = 'An error occurred: ' . htmlspecialchars($e->getMessage());
    }
} else {