You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
798 B
PHP
28 lines
798 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller\Payment;
|
|
|
|
use App\Service\RequestService;
|
|
use Hyperf\HttpServer\Contract\RequestInterface;
|
|
use Hyperf\HttpServer\Contract\ResponseInterface;
|
|
use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface;
|
|
|
|
class ReturnController extends AbstractController
|
|
{
|
|
private RequestService $requestService;
|
|
|
|
public function __construct(RequestService $requestService)
|
|
{
|
|
$this->requestService = $requestService;
|
|
}
|
|
|
|
public function go(RequestInterface $request, ResponseInterface $response): Psr7ResponseInterface
|
|
{
|
|
$token = $request->route('token');
|
|
$requestLog = $this->requestService->getRequestLogByToken($token);
|
|
return $response->redirect($requestLog->getDataValue('returnUrl'));
|
|
}
|
|
}
|