Basic fee extension support now completed

This commit is contained in:
Pinga 2023-12-20 09:30:24 +02:00
parent 04eac7a648
commit 49d7822d1a
4 changed files with 89 additions and 28 deletions

View file

@ -341,15 +341,29 @@ function processDomainCheck($conn, $db, $xml, $trans) {
$returnValue = getDomainPrice($db, $domainName, $tld_id, $date_add, $commandName);
$price = $returnValue['price'];
// Add to fee response array
$feeResponses[] = [
'command' => $commandName,
'period' => $period,
'period_unit' => $period_unit,
'avail' => $domainEntry[1],
'fee' => $price,
'name' => $domainName,
];
$sth = $db->prepare("SELECT price FROM domain_restore_price WHERE tldid = ? LIMIT 1");
$sth->execute([$tld_id]);
$restore_price = $sth->fetchColumn();
if ($commandName == 'restore') {
$feeResponses[] = [
'command' => $commandName,
'period' => $period,
'period_unit' => $period_unit,
'avail' => $domainEntry[1],
'fee' => $restore_price,
'name' => $domainName,
];
} else {
$feeResponses[] = [
'command' => $commandName,
'period' => $period,
'period_unit' => $period_unit,
'avail' => $domainEntry[1],
'fee' => $price,
'name' => $domainName,
];
}
} else {
$feeResponses[] = [
'command' => $commandName,