mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-13 08:07:00 +02:00
Fixed issue with application pricing
This commit is contained in:
parent
8dc01d65d0
commit
a0a16f4bfb
4 changed files with 190 additions and 102 deletions
|
@ -1134,6 +1134,16 @@ class ApplicationsController extends Controller
|
|||
$returnValue = getDomainPrice($db, $domainName, $tld_id, $date_add, 'create', $clid, $currency);
|
||||
$price = $returnValue['price'];
|
||||
|
||||
if (!$price) {
|
||||
$this->container->get('flash')->addMessage('error', 'Error creating domain: The price, period and currency for such TLD are not declared');
|
||||
return $response->withHeader('Location', '/application/create')->withStatus(302);
|
||||
}
|
||||
|
||||
if (($registrar_balance + $creditLimit) < $price) {
|
||||
$this->container->get('flash')->addMessage('error', 'Error creating domain: Low credit: minimum threshold reached');
|
||||
return $response->withHeader('Location', '/application/create')->withStatus(302);
|
||||
}
|
||||
|
||||
try {
|
||||
$db->beginTransaction();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue