Server fixes
This commit is contained in:
parent
fe9d31a076
commit
fccd921545
@ -23,7 +23,13 @@ class Middleware
|
||||
{
|
||||
$container = Application::getContainer();
|
||||
$uri = $request->getUri();
|
||||
|
||||
$path = $uri->getPath();
|
||||
|
||||
if (substr($path, 0, 1) != '/') {
|
||||
$path = "/".$path;
|
||||
}
|
||||
|
||||
$query = $uri->getQuery();
|
||||
|
||||
// Check for an existing session
|
||||
@ -33,7 +39,7 @@ class Middleware
|
||||
// Redirect to the login page
|
||||
if ($query !== "") {
|
||||
return Redirect::create($request, $response, '/login?redirect='.$path."&".$query);
|
||||
} elseif ($path = "/") {
|
||||
} elseif ($path === "/") {
|
||||
return Redirect::create($request, $response, '/login');
|
||||
} else {
|
||||
return Redirect::create($request, $response, '/login?redirect='.$path);
|
||||
|
@ -19,8 +19,8 @@ use Inforbank\Application\Auth\Middleware;
|
||||
use Inforbank\Application\Helper\Header;
|
||||
use Inforbank\Application\Helper\Idob\Transactie;
|
||||
use Inforbank\Application\Helper\Idob\Client;
|
||||
use Inforbank\Application\Helper\Rekeningen;
|
||||
use Inforbank\Application\Helper\Berichten;
|
||||
use Inforbank\Application\Helper\Rekeningen as RekeningHelper;
|
||||
use Inforbank\Application\Helper\Berichten as BerichtenHelper;
|
||||
use Inforbank\Application\Helper\Overboekingen;
|
||||
use Inforbank\Application\Helper\Redirect;
|
||||
use Inforbank\Application\Helper\IBAN;
|
||||
@ -35,7 +35,7 @@ class Idob
|
||||
$app->group('/idob', function () {
|
||||
$this->get('/betalen', function ($request, $response, $args) {
|
||||
$query = $request->getQueryParams();
|
||||
$rekeningen = Rekeningen::getCurrentUserRekeningen();
|
||||
$rekeningen = RekeningHelper::getCurrentUserRekeningen();
|
||||
|
||||
try {
|
||||
$transactie = Transactie::getTransactie($query['trxid']);
|
||||
@ -84,7 +84,7 @@ class Idob
|
||||
Transactie::setTransactionStatus($transactie['transactieId'], 2);
|
||||
|
||||
// Do bericht
|
||||
Berichten::newBericht($this->auth->getUserID(), $naam, "Betaling met transactiereferentie " . $transactie['reference'] . " gelukt.");
|
||||
BerichtenHelper::newBericht($this->auth->getUserID(), $naam, "Betaling met transactiereferentie " . $transactie['reference'] . " gelukt.");
|
||||
|
||||
$response = $response->withStatus(302);
|
||||
$response = $response->withHeader('Location', $redirectUri . "?trxid=".$transactie['transactieId']);
|
||||
|
Reference in New Issue
Block a user