Implemented repository mapper, and venta show

This commit is contained in:
Juan Pablo Vial
2023-08-08 23:53:49 -04:00
parent ef30ae67d2
commit 59825259b6
111 changed files with 2766 additions and 612 deletions

View File

@ -0,0 +1,26 @@
<?php
namespace Incoviba\Controller\Ventas;
use DateTimeImmutable;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
class Pagos
{
public function depositar(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
{
$body = $request->getBody();
$json = json_decode($body->getContents());
$date = new DateTimeImmutable($json->fecha);
$response->getBody()->write(json_encode(['fecha' => $date->format('d-m-Y'), 'message' => 'Not implemented']));
return $response->withHeader('Content-Type', 'application/json');
}
public function abonar(ServerRequestInterface $request, ResponseInterface $response): ResponseInterface
{
$body = $request->getBody();
$json = json_decode($body->getContents());
$date = new DateTimeImmutable($json->fecha);
$response->getBody()->write(json_encode(['fecha' => $date->format('d-m-Y'), 'message' => 'Not implemented']));
return $response->withHeader('Content-Type', 'application/json');
}
}