metaregistrar / php-epp-client

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

Auto Renew coza Domain #208

Closed swartjie closed 4 years ago

swartjie commented 4 years ago

Hey Guys,

I have been looking but have not been able to find an auto renew option in general for metaregistrar, and also not for coza either....

How can I go about using the AutoRenew flag in the class? I am assuming co.za's auto renew is generally the same as all other's but if not, please leme know and I can help find the xml example :).

Looking forward to hearing from you!

metaregistrar commented 4 years ago

Since EPP is an automation engine, there is no auto-renew option in standard EPP. You are supposed to write any renewal scripts yourself and perform renews on domain names where needed. So for CO.ZA, you will have to keep the expiration dates of the domain names in your own database, and renew via EPP when the domain name expires.

That said, Metaregistrar as a company DOES have an autorenew policy, and also an autorenew command added to EPP. You will find the documentation here: https://www.metaregistrar.com/docs/examples/domains/domain-autorenew.html

swartjie commented 4 years ago

I agree 100% you are supposed to do it that way to avoid domains renewing which should not... But COZA does support auto renewals as a registry. I don't personally understand why but ja...

And to complete accreditation we do need to set it to true on a test domain... Any advise? even if I need to run the xml manually, just not sure how to to it with the class?

swartjie commented 4 years ago

I found the documentation on it: https://registry.net.za/content.php?wiki=1&contentid=19&title=EPP%20Domain%20Extensions

<epp:epp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:epp="urn:ietf:params:xml:ns:epp-1.0" xmlns:domain="urn:ietf:params:xml:ns:domain-1.0" xmlns:cozadomain="http://co.za/epp/extensions/cozadomain-1-0" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd">

exampledomain.test.dnservices.co.za false
metaregistrar commented 4 years ago

Hello Marcel,

I have added the cozaEppAutorenewRequest to this repository. This is how you use it:

$domain = new \Metaregistrar\EPP\eppDomain('test.co.za');
$request = new \Metaregistrar\EPP\cozaEppAutorenewRequest($domain,true);
if ($response = $conn->request($request) {
   ....
}
swartjie commented 4 years ago

Hey Bud, Thank you it worked like a charm! Is there guides for how to create the requests ourselves? Something that neatly lays out how it's done?