mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-25 20:08:23 +02:00
Initial work on registrar deposit payments
This commit is contained in:
parent
97818e59e0
commit
2236e77d18
2 changed files with 128 additions and 1 deletions
|
@ -26,7 +26,28 @@ class FinancialsController extends Controller
|
|||
public function deposit(Request $request, Response $response)
|
||||
{
|
||||
if ($_SESSION["auth_roles"] != 0) {
|
||||
return $response->withHeader('Location', '/dashboard')->withStatus(302);
|
||||
if ($request->getMethod() === 'POST') {
|
||||
// Retrieve POST data
|
||||
$data = $request->getParsedBody();
|
||||
$db = $this->container->get('db');
|
||||
$balance = $db->selectRow('SELECT name, email, accountBalance, creditLimit FROM registrar WHERE id = ?',
|
||||
[ $_SESSION["auth_registrar_id"] ]
|
||||
);
|
||||
echo "Payment here";
|
||||
|
||||
return view($response,'admin/financials/deposit-registrar.twig', [
|
||||
'balance' => $balance
|
||||
]);
|
||||
}
|
||||
|
||||
$db = $this->container->get('db');
|
||||
$balance = $db->selectRow('SELECT name, accountBalance, creditLimit FROM registrar WHERE id = ?',
|
||||
[ $_SESSION["auth_registrar_id"] ]
|
||||
);
|
||||
|
||||
return view($response,'admin/financials/deposit-registrar.twig', [
|
||||
'balance' => $balance
|
||||
]);
|
||||
}
|
||||
|
||||
if ($request->getMethod() === 'POST') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue