Skip to content

Commit

Permalink
HOTFIX/account_number_via_clabe (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablorsk authored Sep 29, 2021
1 parent 7b049f4 commit 926ce99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.2] - 2021-09-29

### Added
- Github actions added

### Fixed
- Get mexican account number via CLABE.

## [1.1.1] - 2021-06-21

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/Mx/MxBankAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ public function getInternalBankAccountNumber(): ?string
return null;
}

return substr($this->getBankAccountNumber(), 6, 11);
return substr($this->getBankAccountNumber(), 7, 10);
}
}
3 changes: 2 additions & 1 deletion tests/Mx/MxBankAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function testBankName()

public function testGetInternalBankAccountNumber()
{
static::assertSame('01031285017', (new MxBankAccount('072580010312850172'))->getInternalBankAccountNumber());
static::assertSame('1031285017', (new MxBankAccount('072580010312850172'))->getInternalBankAccountNumber());
static::assertSame('1507317570', (new MxBankAccount('012694015073175704'))->getInternalBankAccountNumber());
static::assertNull((new MxBankAccount('123'))->getInternalBankAccountNumber());
}

Expand Down

0 comments on commit 926ce99

Please sign in to comment.