diff --git a/app/src/Service/Venta/MediosPago/Toku/Invoice.php b/app/src/Service/Venta/MediosPago/Toku/Invoice.php index a3d3296..9f70d2e 100644 --- a/app/src/Service/Venta/MediosPago/Toku/Invoice.php +++ b/app/src/Service/Venta/MediosPago/Toku/Invoice.php @@ -4,7 +4,9 @@ namespace Incoviba\Service\Venta\MediosPago\Toku; use DateMalformedStringException; use DateTimeImmutable; use DateTimeZone; +use PDOException; use Psr\Http\Client\ClientInterface; +use Psr\Log\LoggerInterface; use Incoviba\Common\Implement\Exception\EmptyResponse; use Incoviba\Common\Implement\Exception\EmptyResult; use Incoviba\Exception\InvalidResult; @@ -13,7 +15,6 @@ use Incoviba\Repository; use Incoviba\Service\UF; use Incoviba\Service\Venta\MediosPago\AbstractEndPoint; use Incoviba\Service\Venta\Pago; -use Psr\Log\LoggerInterface; class Invoice extends AbstractEndPoint { @@ -68,7 +69,7 @@ class Invoice extends AbstractEndPoint try { $this->delete($tokuId); $this->invoiceRepository->removeByTokuId($tokuId); - } catch (EmptyResponse $exception) { + } catch (EmptyResponse | PDOException $exception) { $this->logger->warning($exception, ['invoice->toku_id' => $tokuId]); } } diff --git a/app/src/Service/Venta/MediosPago/Toku/Subscription.php b/app/src/Service/Venta/MediosPago/Toku/Subscription.php index d572e73..f0d9126 100644 --- a/app/src/Service/Venta/MediosPago/Toku/Subscription.php +++ b/app/src/Service/Venta/MediosPago/Toku/Subscription.php @@ -1,6 +1,7 @@ delete($tokuId); $this->subscriptionRepsitory->removeByTokuId($tokuId); - } catch (EmptyResponse $exception) { + } catch (EmptyResponse | PDOException $exception) { $this->logger->warning($exception, ['subscription->toku_id' => $tokuId]); } }