mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-20 09:35:59 +02:00
Added new pricing calculation method; testing needed
This commit is contained in:
parent
a07c407543
commit
a8a4c44590
10 changed files with 250 additions and 92 deletions
|
@ -44,7 +44,8 @@ try {
|
|||
|
||||
if ($set_autorenewPeriod) {
|
||||
list($registrar_balance, $creditLimit) = $dbh->query("SELECT accountBalance, creditLimit FROM registrar WHERE id = '$clid' LIMIT 1")->fetch(PDO::FETCH_NUM);
|
||||
$price = $dbh->query("SELECT m12 FROM domain_price WHERE tldid = '$tldid' AND command = 'renew' LIMIT 1")->fetchColumn();
|
||||
$returnValue = getDomainPrice($dbh, $name, $tldid, 12, 'renew');
|
||||
$price = $returnValue['price'];
|
||||
|
||||
if (($registrar_balance + $creditLimit) > $price) {
|
||||
$dbh->exec("UPDATE domain SET rgpstatus = 'autoRenewPeriod', exdate = DATE_ADD(exdate, INTERVAL 12 MONTH), autoRenewPeriod = '12', renewedDate = exdate WHERE id = '$domain_id'");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue