Comando para resetear Toku

This commit is contained in:
Juan Pablo Vial
2025-05-27 18:17:56 -04:00
parent a9a10e012d
commit 892cdf324f
8 changed files with 114 additions and 0 deletions

View File

@ -102,4 +102,13 @@ class Toku extends Controller
}
return $this->withJson($response, $output);
}
public function reset(ServerRequestInterface $request, ResponseInterface $response,
Service\Venta\MediosPago\Toku $tokuService): ResponseInterface
{
if (!isset($_ENV['TOKU_ENV']) or strtolower($_ENV['TOKU_ENV']) !== 'sandbox') {
return $this->withJson($response);
}
$output = $tokuService->reset();
return $this->withJson($response, $output);
}
}