Ascio Web Service v2
PHP 5 Classes CreateOrder - Owner_Change
Replaces the registrant with a new handle. There are 2 ways to submit the new Registrant: With the OwnerChange, it is possible to change Registrant and Admistrative Contact in one request. The rules for the owner-change depend on the registry. Please look at the TLD-Kit for details. An OwnerChange is needed when materialized data is changed If no materialized data is changed, a Registrant Details Update can be used instead. This is easier than an Owner change.
Response CreateOrder(string $sessionId,Order $order)
Response codes
ResultCode | Message | Value |
---|---|---|
200 | Order validated | |
200 | Order received | |
400 | Order not validated | Messages |
401 | Authorization failed | |
405 | Access denied |
CreateOrder Request
Property | Description |
---|---|
sessionId | Example: o58t9fjgw9bjarp6q7byv13e |
order |
CreateOrderResponse
Property |
---|
CreateOrderResult |
order |
Property | Value |
OrderType | Owner_Change |
---|
PHP 5 Classes example
<?php
namespace ascio\v2\examples;
require(__DIR__."/../service/autoload.php");
require(__DIR__."/../../lib/AscioConfig.php");
use ascio\v2 as ascio;
use ascio\lib as lib;
function owner_ChangeExample() {
$config = new lib\Config();
$env = $config->get("testing"); //testing or live
$sessionId = "12345";
$ascioClient = new ascio\AscioServices(array("trace" => true),$env->getWsdl("v2"));
$registrant = new ascio\Registrant();
$registrant->setName("ascio-is-great.com");
$registrant->setOrgName("Ascio");
$registrant->setAddress1("Address1Test");
$registrant->setAddress2("Address2Test");
$registrant->setCity("CityTest");
$registrant->setState("StateTest");
$registrant->setPostalCode("888349");
$registrant->setCountryCode("DK");
$registrant->setEmail($config->getEmail());
$registrant->setPhone("+45.123456789");
$registrant->setFax("+45.987654321");
$registrant->setRegistrantType("C1");
$registrant->setVatNumber("VatNumberTest");
$registrant->setNexusCategory("NexusCategoryTest");
$registrant->setRegistrantNumber("abc123445");
$registrant->setDetails("DetailsTest");
$adminContact = new ascio\Contact();
$adminContact->setStatus("StatusTest");
$adminContact->setHandle("JD123");
$adminContact->setFirstName("John");
$adminContact->setLastName("Doe");
$adminContact->setOrgName("Ascio");
$adminContact->setAddress1("Address1Test");
$adminContact->setAddress2("Address2Test");
$adminContact->setPostalCode("888349");
$adminContact->setCity("CityTest");
$adminContact->setState("StateTest");
$adminContact->setCountryCode("DK");
$adminContact->setEmail($config->getEmail());
$adminContact->setPhone("+45.123456789");
$adminContact->setFax("+45.987654321");
$adminContact->setType("owner");
$adminContact->setDetails("DetailsTest");
$adminContact->setOrganisationNumber("OrganisationNumberTest");
$domain = new ascio\Domain();
$domain->setDomainName($env->getProperties()->getProperty("DomainName"));
$domain->setRegistrant($registrant);
$domain->setAdminContact($adminContact);
$order = new ascio\Order();
$order->setType(ascio\OrderType::Owner_Change);
$order->setDomain($domain);
echo "start validate\n";
$validateOrder = new ascio\ValidateOrder($sessionId, $order);
try {
$response = $ascioClient->ValidateOrder($validateOrder);
} catch (\Exception $e) {
echo ("[".$e->faultcode . "] ". $e->faultstring);
return;
}
echo "end validate\n";
if ($response->getValidateOrderResult()->getResultCode() == 200) {
echo "Validation: OK\r\n";
try {
$createOrderResponse = $ascioClient->CreateOrder(new ascio\CreateOrder($sessionId, $order));
} catch (\Exception $e) {
echo ("[".$e->faultcode . "] ". $e->faultstring);
return;
}
echo "Create Order: ".$createOrderResponse->CreateOrderResult->getResultCode() . " " . $createOrderResponse->CreateOrderResult->getResultMessage() . "\r\n";
if ($createOrderResponse->CreateOrderResult->getResultCode() == 200) {
echo "OrderId : " . $createOrderResponse->CreateOrderResult->getOrderInfo()->getOrderId() . "\r\n";
echo "Order Status : " . $createOrderResponse->CreateOrderResult->getOrderInfo()->getStatus() . "\r\n";
} else {
echo ($response->CreateOrderResult->getMessage()."\n");
foreach($createOrderResponse->CreateOrderResult->getErrors() as $error) {
echo $error."\n";
return $response;
}
}
return $createOrderResponse;
} else {
echo ($response->getValidateOrderResult()->getMessage()."\n");
if ($response->getValidateOrderResult()->getErrors()) {
foreach($response->getValidateOrderResult()->getErrors()->getString() as $error) {
echo $error."\n";
}
}
return $response;
}
}
owner_ChangeExample();
https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl (OTE)
https://aws.ascio.com/2012/01/01/AscioService.wsdl (Live)
Please configure the IP-Whitelisting in the portal/demo-portal.