Skip to content

Commit

Permalink
replaced
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijusCoding committed Oct 20, 2024
1 parent 187972c commit d69dcd2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/Validation/CustomerCreditCardValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ public function __construct(SaferPayCardAliasRepository $saferPayCardAliasReposi
*/
public function validate($idSavedCard, $idCustomer)
{
if (!is_numeric($idCustomer) || !is_numeric($idSavedCard)) {
$this->logger->error(sprintf('%s - Invalid data', self::FILE_NAME), [
'context' => [],
'id_saved_card' => $idSavedCard,
'id_customer' => $idCustomer
if (empty($idSavedCard) || empty($idCustomer)) {
$this->logger->error(sprintf('%s - Missing required data', self::FILE_NAME), [
'context' => []
]);

throw SaferPayException::unknownError();
}

if (empty($idSavedCard) || empty($idCustomer)) {
$this->logger->error(sprintf('%s - Missing required data', self::FILE_NAME), [
'context' => []
if (!is_numeric($idCustomer) || !is_numeric($idSavedCard)) {
$this->logger->error(sprintf('%s - Invalid data', self::FILE_NAME), [
'context' => [],
'id_saved_card' => $idSavedCard,
'id_customer' => $idCustomer
]);

throw SaferPayException::unknownError();
Expand Down

0 comments on commit d69dcd2

Please sign in to comment.