Skip to content

Commit

Permalink
Merge pull request #9 from AntoineAugusti/vocalink-v3.90
Browse files Browse the repository at this point in the history
Vocalink v3.90
  • Loading branch information
AntoineAugusti committed May 13, 2016
2 parents 5ac65f7 + c8c2aec commit c5c7730
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data/valacdos.txt
main.go
25 changes: 15 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
language: go
before_install:
- go get golang.org/x/tools/cmd/vet
- go get github.com/modocache/gover
- go get github.com/AntoineAugusti/moduluschecking/...
sudo: false

matrix:
include:
- go: 1.4
- go: 1.5
- go: 1.6
- go: tip
allow_failures:
- go: tip

script:
- go vet github.com/AntoineAugusti/moduluschecking...
- go test -v ./...
- go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs -i sh -c {}
- gover . coverprofile.txt
after_success:
- bash <(curl -s https://codecov.io/bash) -f coverprofile.txt
- go get -t -v $(go list ./...)
- if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then diff -u <(echo -n) <(gofmt -d .); fi
- if [[ $TRAVIS_GO_VERSION == 1.6* ]]; then go vet $(go list ./...); fi
- go test -v -race $(go list ./...)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Modulus checking is a procedure for validating sort code and account number comb
If you want to know more about modulus checking, read this [GoCardless guide](https://gocardless.com/guides/posts/modulus-checking/).

## Validity
This package follows the Vocalink specification, version 3.80, that will be live on 15/02/2016. More information about the specification can be seen on the [Vocalink website](https://www.vocalink.com/customer-support/modulus-checking).
This package follows the Vocalink specification, version 3.90, that will be live on 13/06/2016. More information about the specification can be seen on the [Vocalink website](https://www.vocalink.com/customer-support/modulus-checking).

## API
If you prefer to send request to a web service, take a look at the package [moduluschecking-api](https://github.com/AntoineAugusti/moduluschecking-api) that offers an API to validate UK bank account numbers, supporting authentication and rate limits.
Expand Down
25 changes: 23 additions & 2 deletions data/weights.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,15 @@
232130,232130,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
232279,232279,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
232279,232279,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
232283,232283,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
232445,232445,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
232445,232445,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
232571,232571,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
232571,232571,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
232636,232636,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
232636,232636,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
232704,232704,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
232704,232704,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
232725,232725,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
232725,232725,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
232813,232813,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
Expand All @@ -224,6 +227,8 @@
233483,233483,MOD11,0,0,0,0,0,0,2,7,6,5,4,3,2,1
233556,233556,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
233556,233556,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
233658,233658,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
233658,233658,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
233693,233693,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
233693,233693,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
233752,233752,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
Expand All @@ -234,6 +239,8 @@
234193,234193,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
234252,234252,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
234252,234252,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
234321,234321,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
234321,234321,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
234377,234377,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
234377,234377,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
234570,234570,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
Expand Down Expand Up @@ -261,6 +268,8 @@
235519,235519,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
235676,235676,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
235676,235676,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
235711,235711,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
235711,235711,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
235756,235756,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
235756,235756,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
235945,235945,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
Expand All @@ -272,10 +281,14 @@
236233,236233,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
236233,236233,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
236247,236247,MOD11,0,0,1,8,2,6,3,7,9,5,8,4,2,1
236293,236293,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
236293,236293,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
236422,236422,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
236422,236422,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
236527,236527,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
236527,236527,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
236538,236538,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
236538,236538,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
236643,236643,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
236643,236643,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
236761,236761,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
Expand All @@ -288,6 +301,8 @@
237265,237265,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
237355,237355,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
237355,237355,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
237423,237423,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
237423,237423,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
237427,237427,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
237427,237427,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
237563,237563,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
Expand All @@ -298,6 +313,8 @@
237728,237728,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
237873,237873,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
237873,237873,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
238020,238020,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
238020,238020,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
238043,238043,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
238043,238043,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
238051,238051,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
Expand Down Expand Up @@ -341,6 +358,8 @@
239295,239295,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
239296,239318,MOD11,7,6,5,4,3,2,7,6,5,4,3,2,1,0
239296,239318,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
239360,239360,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
239360,239360,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
239380,239380,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
239380,239380,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
239435,239435,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
Expand Down Expand Up @@ -847,8 +866,10 @@
309873,309915,MOD11,0,0,3,2,9,8,1,7,6,5,4,3,2,1,9
309917,309999,MOD11,0,0,3,2,9,8,5,7,6,5,4,3,2,1,2
309917,309999,MOD11,0,0,3,2,9,8,1,7,6,5,4,3,2,1,9
400000,400514,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
400000,400514,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
400000,400193,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
400000,400193,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
400196,400514,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
400196,400514,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
400515,400515,MOD11,0,0,0,0,0,0,8,5,7,3,4,9,2,1
400516,404799,MOD11,0,0,0,0,0,0,0,7,6,5,4,3,2,1
400516,404799,DBLAL,2,1,2,1,2,1,2,1,2,1,2,1,2,1
Expand Down

0 comments on commit c5c7730

Please sign in to comment.