FormaPago Service

This commit is contained in:
Juan Pablo Vial
2024-03-13 14:38:44 -03:00
parent c7dd309185
commit 98953cce42
21 changed files with 261 additions and 71 deletions

View File

@ -6,8 +6,8 @@ use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Incoviba\Service;
use Psr\Log\LoggerInterface;
use Incoviba\Service;
class Authentication
{
@ -27,7 +27,11 @@ class Authentication
$response = $this->responseFactory->createResponse(301, 'Not logged in')
->withHeader('Referer', (string) $request->getUri())
->withHeader('X-Redirected-URI', (string) $request->getUri());
return $this->view->render($response, 'login.form', ['redirect_uri' => (string) $request->getUri()]);
$url = "{$request->getUri()}";
if (str_ends_with($url, '/login')) {
$url = str_replace('/login', '', $url);
}
return $this->view->render($response, 'login.form', ['redirect_uri' => $url]);
}
protected function isValid(ServerRequestInterface $request): bool