mirror of
https://github.com/getnamingo/registry.git
synced 2025-06-27 22:53:34 +02:00
Added launch phase delete for EPP
This commit is contained in:
parent
de119b013f
commit
7e34dd7501
5 changed files with 196 additions and 169 deletions
|
@ -1324,36 +1324,7 @@ class ApplicationsController extends Controller
|
|||
|
||||
try {
|
||||
$db->beginTransaction();
|
||||
|
||||
$hostIds = $db->select(
|
||||
'SELECT id FROM host WHERE domain_id = ?',
|
||||
[$domain_id]
|
||||
);
|
||||
|
||||
foreach ($hostIds as $host) {
|
||||
$host_id = $host['id'];
|
||||
|
||||
// Delete operations
|
||||
$db->delete(
|
||||
'host_addr',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
$db->delete(
|
||||
'host_status',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
$db->delete(
|
||||
'application_host_map',
|
||||
[
|
||||
'host_id' => $host_id
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
// Delete domain related records
|
||||
$db->delete(
|
||||
'application_contact_map',
|
||||
|
|
|
@ -577,6 +577,7 @@ function processDomainCreate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
$extensionNode = $xml->command->extension;
|
||||
if (isset($extensionNode)) {
|
||||
$fee_create = $xml->xpath('//fee:create')[0] ?? null;
|
||||
$launch_create = $xml->xpath('//launch:create')[0] ?? null;
|
||||
}
|
||||
|
||||
$parts = extractDomainAndTLD($domainName);
|
||||
|
|
|
@ -169,6 +169,11 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
$domainName = $xml->command->delete->children('urn:ietf:params:xml:ns:domain-1.0')->delete->name;
|
||||
$clTRID = (string) $xml->command->clTRID;
|
||||
|
||||
$extensionNode = $xml->command->extension;
|
||||
if (isset($extensionNode)) {
|
||||
$launch_delete = $xml->xpath('//launch:delete')[0] ?? null;
|
||||
}
|
||||
|
||||
if (!$domainName) {
|
||||
sendEppError($conn, $db, 2003, 'Please specify the domain name that will be deleted', $clTRID, $trans);
|
||||
return;
|
||||
|
@ -181,7 +186,11 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
return;
|
||||
}
|
||||
|
||||
$stmt = $db->prepare("SELECT id, tldid, registrant, crdate, exdate, clid, crid, upid, trdate, trstatus, reid, redate, acid, acdate, rgpstatus, addPeriod, autoRenewPeriod, renewPeriod, renewedDate, transferPeriod FROM domain WHERE name = :name LIMIT 1");
|
||||
if (isset($launch_delete)) {
|
||||
$stmt = $db->prepare("SELECT id, tldid, registrant, crdate, exdate, clid, crid, upid, trdate, trstatus, reid, redate, acid, acdate, rgpstatus, addPeriod, autoRenewPeriod, renewPeriod, renewedDate, transferPeriod FROM application WHERE name = :name LIMIT 1");
|
||||
} else {
|
||||
$stmt = $db->prepare("SELECT id, tldid, registrant, crdate, exdate, clid, crid, upid, trdate, trstatus, reid, redate, acid, acdate, rgpstatus, addPeriod, autoRenewPeriod, renewPeriod, renewedDate, transferPeriod FROM domain WHERE name = :name LIMIT 1");
|
||||
}
|
||||
$stmt->execute([':name' => $domainName]);
|
||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
|
@ -222,144 +231,135 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
return;
|
||||
}
|
||||
|
||||
$stmt = $db->prepare("SELECT status FROM domain_status WHERE domain_id = :domain_id");
|
||||
$stmt->execute([':domain_id' => $domain_id]);
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$status = $row['status'];
|
||||
if (preg_match('/.*(UpdateProhibited|DeleteProhibited)$/', $status) || preg_match('/^pending/', $status)) {
|
||||
sendEppError($conn, $db, 2304, 'The domain name has a status that does not allow deletion', $clTRID, $trans);
|
||||
return;
|
||||
if (!isset($launch_delete)) {
|
||||
$stmt = $db->prepare("SELECT status FROM domain_status WHERE domain_id = :domain_id");
|
||||
$stmt->execute([':domain_id' => $domain_id]);
|
||||
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
|
||||
$status = $row['status'];
|
||||
if (preg_match('/.*(UpdateProhibited|DeleteProhibited)$/', $status) || preg_match('/^pending/', $status)) {
|
||||
sendEppError($conn, $db, 2304, 'The domain name has a status that does not allow deletion', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$grace_period = 30;
|
||||
|
||||
// DELETE FROM domain_status
|
||||
$stmt = $db->prepare("DELETE FROM domain_status WHERE domain_id = ?");
|
||||
$stmt->execute([$domain_id]);
|
||||
|
||||
// UPDATE domain
|
||||
$stmt = $db->prepare("UPDATE domain SET rgpstatus = 'redemptionPeriod', delTime = DATE_ADD(CURRENT_TIMESTAMP(3), INTERVAL ? DAY) WHERE id = ?");
|
||||
$stmt->execute([$grace_period, $domain_id]);
|
||||
|
||||
// INSERT INTO domain_status
|
||||
$stmt = $db->prepare("INSERT INTO domain_status (domain_id, status) VALUES(?, 'pendingDelete')");
|
||||
$stmt->execute([$domain_id]);
|
||||
|
||||
if ($rgpstatus) {
|
||||
if ($rgpstatus === 'addPeriod') {
|
||||
$stmt = $db->prepare("SELECT id FROM domain WHERE id = ? AND (CURRENT_TIMESTAMP(3) < DATE_ADD(crdate, INTERVAL 5 DAY)) LIMIT 1");
|
||||
$stmt->execute([$domain_id]);
|
||||
$addPeriod_id = $stmt->fetchColumn();
|
||||
|
||||
if ($addPeriod_id) {
|
||||
$returnValue = getDomainPrice($db, $domainName, $tldid, $addPeriod, 'create');
|
||||
$price = $returnValue['price'];
|
||||
|
||||
if (isset($launch_delete)) {
|
||||
$phaseType = (string) $launch_delete->children('urn:ietf:params:xml:ns:launch-1.0')->phase;
|
||||
$applicationID = (string) $launch_delete->children('urn:ietf:params:xml:ns:launch-1.0')->applicationID;
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, $db, 2400, 'The price, period and currency for such TLD are not declared', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
$stmt = $db->prepare("SELECT id FROM application WHERE name = ? AND phase_type = ? AND application_id = ? LIMIT 1");
|
||||
$stmt->execute([$domainName, $phaseType, $applicationID]);
|
||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
// Update registrar
|
||||
$stmt = $db->prepare("UPDATE registrar SET accountBalance = (accountBalance + ?) WHERE id = ?");
|
||||
$stmt->execute([$price, $clid]);
|
||||
if (!$result) {
|
||||
sendEppError($conn, $db, 2306, "Please verify the launch phase and/or the application ID", $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
||||
// Insert into payment_history
|
||||
$description = "domain name is deleted by the registrar during grace addPeriod, the registry provides a credit for the cost of the registration domain $domainName for period $addPeriod MONTH";
|
||||
$stmt = $db->prepare("INSERT INTO payment_history (registrar_id, date, description, amount) VALUES(?, CURRENT_TIMESTAMP(3), ?, ?)");
|
||||
$stmt->execute([$clid, $description, $price]);
|
||||
// Delete application related records
|
||||
$db->exec("DELETE FROM application_contact_map WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM application_host_map WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM application_status WHERE domain_id = $domain_id");
|
||||
|
||||
// Fetch host ids
|
||||
$stmt = $db->prepare("SELECT id FROM host WHERE domain_id = ?");
|
||||
$stmt->execute([$domain_id]);
|
||||
$stmt = $db->prepare("DELETE FROM application WHERE id = ?");
|
||||
$stmt->execute([$domain_id]);
|
||||
|
||||
while ($host_id = $stmt->fetchColumn()) {
|
||||
$db->exec("DELETE FROM host_addr WHERE host_id = $host_id");
|
||||
$db->exec("DELETE FROM host_status WHERE host_id = $host_id");
|
||||
$db->exec("DELETE FROM domain_host_map WHERE host_id = $host_id");
|
||||
}
|
||||
|
||||
// Delete domain related records
|
||||
$db->exec("DELETE FROM domain_contact_map WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM domain_host_map WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM domain_authInfo WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM domain_status WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM secdns WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM host WHERE domain_id = $domain_id");
|
||||
|
||||
$stmt = $db->prepare("DELETE FROM domain WHERE id = ?");
|
||||
$stmt->execute([$domain_id]);
|
||||
|
||||
if ($stmt->errorCode() != "00000") {
|
||||
sendEppError($conn, $db, 2400, 'The domain name has not been deleted, it has something to do with other objects', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle statistics
|
||||
$curdate_id = $db->query("SELECT id FROM statistics WHERE date = CURDATE()")->fetchColumn();
|
||||
|
||||
if (!$curdate_id) {
|
||||
$db->exec("INSERT IGNORE INTO statistics (date) VALUES(CURDATE())");
|
||||
}
|
||||
if ($stmt->errorCode() != "00000") {
|
||||
sendEppError($conn, $db, 2400, 'The application has not been deleted, it has something to do with other objects', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
||||
$db->exec("UPDATE statistics SET deleted_domains = deleted_domains + 1 WHERE date = CURDATE()");
|
||||
}
|
||||
} elseif ($rgpstatus === 'autoRenewPeriod') {
|
||||
$stmt = $db->prepare("SELECT id FROM domain WHERE id = ? AND (CURRENT_TIMESTAMP(3) < DATE_ADD(renewedDate, INTERVAL 45 DAY)) LIMIT 1");
|
||||
$stmt->execute([$domain_id]);
|
||||
$autoRenewPeriod_id = $stmt->fetchColumn();
|
||||
$svTRID = generateSvTRID();
|
||||
$response = [
|
||||
'command' => 'delete_domain',
|
||||
'resultCode' => 1000,
|
||||
'lang' => 'en-US',
|
||||
'message' => 'Command completed successfully',
|
||||
'clTRID' => $clTRID,
|
||||
'svTRID' => $svTRID,
|
||||
];
|
||||
|
||||
if ($autoRenewPeriod_id) {
|
||||
$returnValue = getDomainPrice($db, $domainName, $tldid, $autoRenewPeriod, 'renew');
|
||||
$price = $returnValue['price'];
|
||||
} else {
|
||||
$grace_period = 30;
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, $db, 2400, 'The price, period and currency for such TLD are not declared', $clTRID, $trans);
|
||||
return;
|
||||
// DELETE FROM domain_status
|
||||
$stmt = $db->prepare("DELETE FROM domain_status WHERE domain_id = ?");
|
||||
$stmt->execute([$domain_id]);
|
||||
|
||||
// UPDATE domain
|
||||
$stmt = $db->prepare("UPDATE domain SET rgpstatus = 'redemptionPeriod', delTime = DATE_ADD(CURRENT_TIMESTAMP(3), INTERVAL ? DAY) WHERE id = ?");
|
||||
$stmt->execute([$grace_period, $domain_id]);
|
||||
|
||||
// INSERT INTO domain_status
|
||||
$stmt = $db->prepare("INSERT INTO domain_status (domain_id, status) VALUES(?, 'pendingDelete')");
|
||||
$stmt->execute([$domain_id]);
|
||||
|
||||
if ($rgpstatus) {
|
||||
if ($rgpstatus === 'addPeriod') {
|
||||
$stmt = $db->prepare("SELECT id FROM domain WHERE id = ? AND (CURRENT_TIMESTAMP(3) < DATE_ADD(crdate, INTERVAL 5 DAY)) LIMIT 1");
|
||||
$stmt->execute([$domain_id]);
|
||||
$addPeriod_id = $stmt->fetchColumn();
|
||||
|
||||
if ($addPeriod_id) {
|
||||
$returnValue = getDomainPrice($db, $domainName, $tldid, $addPeriod, 'create');
|
||||
$price = $returnValue['price'];
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, $db, 2400, 'The price, period and currency for such TLD are not declared', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
||||
// Update registrar
|
||||
$stmt = $db->prepare("UPDATE registrar SET accountBalance = (accountBalance + ?) WHERE id = ?");
|
||||
$stmt->execute([$price, $clid]);
|
||||
|
||||
// Insert into payment_history
|
||||
$description = "domain name is deleted by the registrar during grace addPeriod, the registry provides a credit for the cost of the registration domain $domainName for period $addPeriod MONTH";
|
||||
$stmt = $db->prepare("INSERT INTO payment_history (registrar_id, date, description, amount) VALUES(?, CURRENT_TIMESTAMP(3), ?, ?)");
|
||||
$stmt->execute([$clid, $description, $price]);
|
||||
|
||||
// Fetch host ids
|
||||
$stmt = $db->prepare("SELECT id FROM host WHERE domain_id = ?");
|
||||
$stmt->execute([$domain_id]);
|
||||
|
||||
while ($host_id = $stmt->fetchColumn()) {
|
||||
$db->exec("DELETE FROM host_addr WHERE host_id = $host_id");
|
||||
$db->exec("DELETE FROM host_status WHERE host_id = $host_id");
|
||||
$db->exec("DELETE FROM domain_host_map WHERE host_id = $host_id");
|
||||
}
|
||||
|
||||
// Delete domain related records
|
||||
$db->exec("DELETE FROM domain_contact_map WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM domain_host_map WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM domain_authInfo WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM domain_status WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM secdns WHERE domain_id = $domain_id");
|
||||
$db->exec("DELETE FROM host WHERE domain_id = $domain_id");
|
||||
|
||||
$stmt = $db->prepare("DELETE FROM domain WHERE id = ?");
|
||||
$stmt->execute([$domain_id]);
|
||||
|
||||
if ($stmt->errorCode() != "00000") {
|
||||
sendEppError($conn, $db, 2400, 'The domain name has not been deleted, it has something to do with other objects', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle statistics
|
||||
$curdate_id = $db->query("SELECT id FROM statistics WHERE date = CURDATE()")->fetchColumn();
|
||||
|
||||
if (!$curdate_id) {
|
||||
$db->exec("INSERT IGNORE INTO statistics (date) VALUES(CURDATE())");
|
||||
}
|
||||
|
||||
$db->exec("UPDATE statistics SET deleted_domains = deleted_domains + 1 WHERE date = CURDATE()");
|
||||
}
|
||||
} elseif ($rgpstatus === 'autoRenewPeriod') {
|
||||
$stmt = $db->prepare("SELECT id FROM domain WHERE id = ? AND (CURRENT_TIMESTAMP(3) < DATE_ADD(renewedDate, INTERVAL 45 DAY)) LIMIT 1");
|
||||
$stmt->execute([$domain_id]);
|
||||
$autoRenewPeriod_id = $stmt->fetchColumn();
|
||||
|
||||
// Update registrar
|
||||
$stmt = $db->prepare("UPDATE registrar SET accountBalance = (accountBalance + ?) WHERE id = ?");
|
||||
$stmt->execute([$price, $clid]);
|
||||
|
||||
// Insert into payment_history
|
||||
$description = "domain name is deleted by the registrar during grace autoRenewPeriod, the registry provides a credit for the cost of the renewal domain $domainName for period $autoRenewPeriod MONTH";
|
||||
$stmt = $db->prepare("INSERT INTO payment_history (registrar_id, date, description, amount) VALUES(?, CURRENT_TIMESTAMP(3), ?, ?)");
|
||||
$stmt->execute([$clid, $description, $price]);
|
||||
}
|
||||
} elseif ($rgpstatus === 'renewPeriod') {
|
||||
$stmt = $db->prepare("SELECT id FROM domain WHERE id = ? AND (CURRENT_TIMESTAMP(3) < DATE_ADD(renewedDate, INTERVAL 5 DAY)) LIMIT 1");
|
||||
$stmt->execute([$domain_id]);
|
||||
$renewPeriod_id = $stmt->fetchColumn();
|
||||
|
||||
if ($renewPeriod_id) {
|
||||
$returnValue = getDomainPrice($db, $domainName, $tldid, $renewPeriod, 'renew');
|
||||
$price = $returnValue['price'];
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, $db, 2400, 'The price, period and currency for such TLD are not declared', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
||||
// Update registrar
|
||||
$stmt = $db->prepare("UPDATE registrar SET accountBalance = (accountBalance + ?) WHERE id = ?");
|
||||
$stmt->execute([$price, $clid]);
|
||||
|
||||
// Insert into payment_history
|
||||
$description = "domain name is deleted by the registrar during grace renewPeriod, the registry provides a credit for the cost of the renewal domain $domainName for period $renewPeriod MONTH";
|
||||
$stmt = $db->prepare("INSERT INTO payment_history (registrar_id, date, description, amount) VALUES(?, CURRENT_TIMESTAMP(3), ?, ?)");
|
||||
$stmt->execute([$clid, $description, $price]);
|
||||
}
|
||||
} elseif ($rgpstatus === 'transferPeriod') {
|
||||
$stmt = $db->prepare("SELECT id FROM domain WHERE id = ? AND (CURRENT_TIMESTAMP(3) < DATE_ADD(trdate, INTERVAL 5 DAY)) LIMIT 1");
|
||||
$stmt->execute([$domain_id]);
|
||||
$transferPeriod_id = $stmt->fetchColumn();
|
||||
|
||||
if ($transferPeriod_id) {
|
||||
// Return money if a transfer was also a renew
|
||||
if ($transferPeriod > 0) {
|
||||
$returnValue = getDomainPrice($db, $domainName, $tldid, $transferPeriod, 'renew');
|
||||
if ($autoRenewPeriod_id) {
|
||||
$returnValue = getDomainPrice($db, $domainName, $tldid, $autoRenewPeriod, 'renew');
|
||||
$price = $returnValue['price'];
|
||||
|
||||
if (!isset($price)) {
|
||||
|
@ -372,23 +372,72 @@ function processDomainDelete($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
$stmt->execute([$price, $clid]);
|
||||
|
||||
// Insert into payment_history
|
||||
$description = "domain name is deleted by the registrar during grace transferPeriod, the registry provides a credit for the cost of the transfer domain $domainName for period $transferPeriod MONTH";
|
||||
$description = "domain name is deleted by the registrar during grace autoRenewPeriod, the registry provides a credit for the cost of the renewal domain $domainName for period $autoRenewPeriod MONTH";
|
||||
$stmt = $db->prepare("INSERT INTO payment_history (registrar_id, date, description, amount) VALUES(?, CURRENT_TIMESTAMP(3), ?, ?)");
|
||||
$stmt->execute([$clid, $description, $price]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif ($rgpstatus === 'renewPeriod') {
|
||||
$stmt = $db->prepare("SELECT id FROM domain WHERE id = ? AND (CURRENT_TIMESTAMP(3) < DATE_ADD(renewedDate, INTERVAL 5 DAY)) LIMIT 1");
|
||||
$stmt->execute([$domain_id]);
|
||||
$renewPeriod_id = $stmt->fetchColumn();
|
||||
|
||||
$svTRID = generateSvTRID();
|
||||
$response = [
|
||||
'command' => 'delete_domain',
|
||||
'resultCode' => 1001,
|
||||
'lang' => 'en-US',
|
||||
'message' => 'Command completed successfully; action pending',
|
||||
'clTRID' => $clTRID,
|
||||
'svTRID' => $svTRID,
|
||||
];
|
||||
if ($renewPeriod_id) {
|
||||
$returnValue = getDomainPrice($db, $domainName, $tldid, $renewPeriod, 'renew');
|
||||
$price = $returnValue['price'];
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, $db, 2400, 'The price, period and currency for such TLD are not declared', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
||||
// Update registrar
|
||||
$stmt = $db->prepare("UPDATE registrar SET accountBalance = (accountBalance + ?) WHERE id = ?");
|
||||
$stmt->execute([$price, $clid]);
|
||||
|
||||
// Insert into payment_history
|
||||
$description = "domain name is deleted by the registrar during grace renewPeriod, the registry provides a credit for the cost of the renewal domain $domainName for period $renewPeriod MONTH";
|
||||
$stmt = $db->prepare("INSERT INTO payment_history (registrar_id, date, description, amount) VALUES(?, CURRENT_TIMESTAMP(3), ?, ?)");
|
||||
$stmt->execute([$clid, $description, $price]);
|
||||
}
|
||||
} elseif ($rgpstatus === 'transferPeriod') {
|
||||
$stmt = $db->prepare("SELECT id FROM domain WHERE id = ? AND (CURRENT_TIMESTAMP(3) < DATE_ADD(trdate, INTERVAL 5 DAY)) LIMIT 1");
|
||||
$stmt->execute([$domain_id]);
|
||||
$transferPeriod_id = $stmt->fetchColumn();
|
||||
|
||||
if ($transferPeriod_id) {
|
||||
// Return money if a transfer was also a renew
|
||||
if ($transferPeriod > 0) {
|
||||
$returnValue = getDomainPrice($db, $domainName, $tldid, $transferPeriod, 'renew');
|
||||
$price = $returnValue['price'];
|
||||
|
||||
if (!isset($price)) {
|
||||
sendEppError($conn, $db, 2400, 'The price, period and currency for such TLD are not declared', $clTRID, $trans);
|
||||
return;
|
||||
}
|
||||
|
||||
// Update registrar
|
||||
$stmt = $db->prepare("UPDATE registrar SET accountBalance = (accountBalance + ?) WHERE id = ?");
|
||||
$stmt->execute([$price, $clid]);
|
||||
|
||||
// Insert into payment_history
|
||||
$description = "domain name is deleted by the registrar during grace transferPeriod, the registry provides a credit for the cost of the transfer domain $domainName for period $transferPeriod MONTH";
|
||||
$stmt = $db->prepare("INSERT INTO payment_history (registrar_id, date, description, amount) VALUES(?, CURRENT_TIMESTAMP(3), ?, ?)");
|
||||
$stmt->execute([$clid, $description, $price]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$svTRID = generateSvTRID();
|
||||
$response = [
|
||||
'command' => 'delete_domain',
|
||||
'resultCode' => 1001,
|
||||
'lang' => 'en-US',
|
||||
'message' => 'Command completed successfully; action pending',
|
||||
'clTRID' => $clTRID,
|
||||
'svTRID' => $svTRID,
|
||||
];
|
||||
}
|
||||
|
||||
$epp = new EPP\EppWriter();
|
||||
$xml = $epp->epp_writer($response);
|
||||
|
|
|
@ -171,6 +171,11 @@ function processHostInfo($conn, $db, $xml, $trans) {
|
|||
function processDomainInfo($conn, $db, $xml, $trans) {
|
||||
$domainName = $xml->command->info->children('urn:ietf:params:xml:ns:domain-1.0')->info->name;
|
||||
$clTRID = (string) $xml->command->clTRID;
|
||||
|
||||
$extensionNode = $xml->command->extension;
|
||||
if (isset($extensionNode)) {
|
||||
$launch_info = $xml->xpath('//launch:info')[0] ?? null;
|
||||
}
|
||||
|
||||
$result = $xml->xpath('//domain:authInfo/domain:pw[1]');
|
||||
if (!empty($result)) {
|
||||
|
|
|
@ -931,6 +931,7 @@ function processDomainUpdate($conn, $db, $xml, $clid, $database_type, $trans) {
|
|||
if (isset($extensionNode)) {
|
||||
$rgp_update = $xml->xpath('//rgp:update')[0] ?? null;
|
||||
$secdns_update = $xml->xpath('//secDNS:update')[0] ?? null;
|
||||
$launch_update = $xml->xpath('//launch:update')[0] ?? null;
|
||||
}
|
||||
|
||||
if ($domainRem === null && $domainAdd === null && $domainChg === null && $extensionNode === null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue