PHP 5 CreateOrder - Change_Locks

Changes locks:

  • TransferLock: The domain can't be transferred.
  • DeleteLock: The domain can't be deleted/expired.
  • UpdateLock: Nothing can be changed.

Response CreateOrder(string $sessionId,Order $order)

Response codes

ResultCodeMessageValue
200Order validated
200Order received
400Order not validatedMessages
401Authorization failed
405Access denied

CreateOrder request

PropertyDescription
sessionIdExample: o58t9fjgw9bjarp6q7byv13e
order

CreateOrderResponse

Property
CreateOrderResult
order

PHP 5 example

<?php
$wsdl = 'https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl';
$client = new SoapClient($wsdl,array( "trace" => 1 ));

// In PHP you should create a clone of the contact object
// Otherwise the soap-client will create a soap-reference instead of using the full data.
// That won't work 

$order = array(
    'Type' => 'Change_Locks',
    'Comments' => 'Order Test',
    'Domain' => Array(
        'DomainName'    => 'myDomainName',
        'TransferLock'  => 'Lock',    //the domain can't be transferred
        'DeleteLock'    => 'Unlock',  //the domain can't be deleted
        'UpdateLock'    => 'Unlock'   //the domain can't be modified. Prevents almost anything.
        
    );

$params = array(
    'sessionId' => 'mySessionId',
    'order' => $order
    );
try {
    $result = $client->CreateOrder($params);
    
    echo "ResultCode : ".$result->CreateOrderResult->ResultCode."\r\n";
    echo "ResultMessage : ".$result->CreateOrderResult->Message."\r\n";
    
    if ($result->CreateOrderResult->ResultCode == '200') {
        echo "OrderId : ".$result->order->OrderId."\r\n";
    }   
} catch(Exception $e) {
    echo $e->getMessage(); 
}
WSDL for AWS v2
https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl (OTE)
https://aws.ascio.com/2012/01/01/AscioService.wsdl (Live)