Sync

%Plugin_Name%_Sync

Purpose

Use this function to:

  • check domain registration status
  • request domain information

Input Parameters

  • configarray: an array of parameters defined during plugin configuration.
  • tld: a top-level domain name.
  • sld: a second-level domain name.
  • additionalfields: supplementary data for further domain processing.
  • details: domain information request only.
    • If the details parameter is false, the function checks whether a domain registration is completed or not, and then returns the appropriate status.

    • If the details parameter is true, the function receives domain details and then returns them.

    • The function is called with the details=false parameter only for a domain registration; it can be called with the details=true parameter at any time.

Return Parameters

  • completed: either true if the operation is successfully completed, or false if the operation is in progress. If false, the method must be called again until either true is received or an error occurs.
  • expirydate: the domain expiration date; it is optional if the details input parameter is false, and it is mandatory if the details input parameter is true.
  • additionalfields (optional): supplementary data for further domain processing.
  • conflictcode (optional): domain data conflict code (integer). This parameter is returned if there is a conflict between domain data in CloudBlue Commerce and domain data in a registrar system. Unless the plugin is programmed to return one of the reserved conflict codes, we recommend that the code returned by the registrar system be passed.
  • conflictmessage (optional): conflict message (string). This parameter is returned if the conflictcode parameter is returned for better understanding of the conflict nature. The conflict message is displayed in the PCP.

Mandatory

No

Example

function Example_Sync($params)
{
   $sld = $params["sld"];
   $tld = $params["tld"];
   
   // Restore OrderID which was previously saved by Example_RegisterDomain()
   $orderID = $params['additionalfields']['OrderID'];
   // Check if domain has been registered
   // $domainInfo = $api->getOrderInfo($orderID);
   
   $result = array(
         "completed" => true,
         "expirydate" => $domainInfo["expirydate"],
         "conflictcode" => "103", //optional
         "conflictmessage" => "Domain has been transferred out!", //optional
   );
   // Return "completed" => false in case of pending status
   // return array("completed" => false);
}
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.