Update domain Status
bibawa opened this issue · comments
Hi,
I'm trying to update the domain status of a domainname with the following code:
$domain = new eppDomain("domain.be");
$update = new eppDomain("domain.be");
$update->addStatus('clientTransferProhibited');
$request = new eppUpdateDomainRequest($domain, null, null, $update);
$result = $conn->request($request);
Every time when I run this command I receive error message "Error 2001: Command syntax error"
Does anyone has any idea about what I'm doing the wrong way ?
brg,
@bibawa Statuses can be updated through add
and delete
but not update
.
$add = new eppDomain("domain.be");
$add->addStatus('clientTransferProhibited');
$request = new eppUpdateDomainRequest($domain, $add);
To remove the status you'll need to provide it to the delete handler.
$delete = new eppDomain("domain.be");
$delete->addStatus('clientTransferProhibited');
$request = new eppUpdateDomainRequest($domain, null, $delete);
Thanks! that's working perfectly.