SaveContactDetails

%Plugin_Name%_SaveContactDetails

Purpose

The function changes WHOIS information of a domain.

Input Parameters

  • configarray: an array of parameters defined during plugin configuration.
  • tld: a top-level domain name.
  • sld: a second-level domain name.
  • contactdetails: contact information, an array containing the following elements:
    • Registrant
    • Admin
    • Tech
    • Billing
    • each of which, in turn, is an associative array of the following elements:

      • First Name
      • Middle Name
      • Last Name
      • country
      • company
      • postcode
      • city
      • state
      • statename
      • address1
      • address2
      • Email
      • phonenumber
      • Fax
      • birthdate
      • phonenumberseparated: an associative array containing the following data:
        • countryCode
        • areaCode
        • number
        • ext
      • faxseparated: an associative array containing the following data:
        • countryCode
        • areaCode
        • number
        • ext
  • additionalfields: supplementary data for further domain processing.

Return Parameters

The method returns either nothing or an associative array 'additionalfields' containing the following data:

'key' => 'value': only strings allowed for both key and value.

Mandatory

No

Example

function Example_SaveContactDetails($params)
{
	$sld = $params["sld"];
	$tld = $params["tld"];
	$registrant = $params["contactdetails"]["Registrant"];
	$owner["first_name"] = $registrant["First Name"];
	$owner["last_name"]  = $registrant["Last Name"];
	$owner["org_name"] = $registrant["company"];
	
	$phone = $registrant["phonenumberseparated"];
	$owner["phone"] = $phone["countryCode"].$phone["areaCode"].$phone["number"].$phone["ext"];
	
	$fax = $registrant["faxseparated"];
	$owner["fax"]	= $fax["countryCode"].$fax["areaCode"].$fax["number"].$fax["ext"];
	
	$owner["email"] = $registrant["Email"];
	$owner["postal_code"] = $registrant["postcode"];
	$owner["country"] = $registrant["country"];
	$owner["state"] = $registrant["state"];
	$owner["city"]	= $registrant["city"];
	$owner["address1"] = $registrant["address1"];
	$owner["address2"] = $registrant["address2"];
	
	// The same information for Technical, Billing and Admin contacts
	$billing = $params["contactdetails"]["Billing"];
	$tech = $params["contactdetails"]["Tech"];
	$admin = $params["contactdetails"]["Admin"];
	$contactID = $params["additionalfields"]["RegistrantContactID"];
	
	return array("msg" => "Completed");
	
}
CloudBlue, an Ingram Micro business, uses cookies to improve the usability of our site. By continuing to use this site and/or logging in you are accepting the use of these cookies. For more information, visit our Privacy Policy.