Skip to content

Commit

Permalink
Merge pull request #13 from alexlana/main
Browse files Browse the repository at this point in the history
Adicionar zeros à esquerda do CRC16 quando necessário. Close #10
  • Loading branch information
renatomb authored Jul 17, 2021
2 parents 7932b8c + f34e831 commit 5b1471c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions funcoes_pix.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ function charCodeAt($str, $i) {
$hex = $crc & 0xFFFF;
$hex = dechex($hex);
$hex = strtoupper($hex);
$hex = str_pad($hex, 4, '0', STR_PAD_LEFT);

return $hex;
}

Expand Down

0 comments on commit 5b1471c

Please sign in to comment.