Skip to content

Commit

Permalink
Fixed Card No and First name for Visa
Browse files Browse the repository at this point in the history
  • Loading branch information
rakibdevs committed Jun 29, 2022
1 parent e597a9e commit b292c6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Parser/VisaMrzParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected function extract(): self
*/
protected function getCardNo(): ?string
{
$cardNo = substr($this->firstLine, 0, 9);
$cardNo = substr($this->secondLine, 0, 9);
$cardNo = chop($cardNo, "<"); // remove extra '<' from card no

return $cardNo;
Expand Down Expand Up @@ -107,7 +107,7 @@ protected function getDateOfBirth(): ?string
*/
protected function getFirstName(): ?string
{
return isset($this->nameString[1]) ? chop($this->nameString[1], "<") : null;
return isset($this->nameString[1]) ? str_replace('<', ' ', chop($this->nameString[1], "<")) : null;
}

/**
Expand Down

0 comments on commit b292c6a

Please sign in to comment.