metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
213 stars 156 forks source link

addDomainStatus #80

Closed pc-partner closed 7 years ago

pc-partner commented 7 years ago

Hi,

I'm having problems with locking or unlocking a dnsbe domainname. To modify contacts, nameservers it seems obvious. To change the lock parameters it is more complicated. Or so it seems.

We need to use the function addDomainStatus but i'm able to figure out how to use it:

$del = null; $domain = new eppDomain($domainname); $update = new eppUpdateDomainRequest($domain, null, $domain, null); $update->addDomainStatus($update, 'clientTransferProhibited');

if ($response = $conn->request($update)) { echo $response->getResultMessage() . "\n"; }

I hope you can help me.

Thanks

metaregistrar commented 7 years ago

Hi,

This is the correct way to perform the update:

$del = null; $domain = new eppDomain($domainname); $update = new eppDomain($domainname); $update->addStatus('clientTransferProhibited'); $request = new eppUpdateDomainRequest($domain, null, $update, null); if ($result = $conn->request($request)) { }

So you fill the $update object with the changes you want.

pc-partner commented 7 years ago

that works!