mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-31 14:56:16 +02:00
Basic fee extension support now completed
This commit is contained in:
parent
04eac7a648
commit
49d7822d1a
4 changed files with 89 additions and 28 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue