Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

211 Add support for IAT #228

Merged
merged 68 commits into from
Jul 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
a57d6b3
Rename BatchARC_test.go to batchARC_test.go
bkmoovio Jun 22, 2018
c7079dd
Merge pull request #28 from moov-io/master
bkmoovio Jun 25, 2018
75b48ec
Merge pull request #29 from moov-io/master
bkmoovio Jun 25, 2018
8a12706
#211 Support for IAT
bkmoovio Jun 26, 2018
dcaef50
#211 megacheck
bkmoovio Jun 26, 2018
287e7a6
#211 Formatting
bkmoovio Jun 26, 2018
c676384
#211 SEC Code IAT
bkmoovio Jun 26, 2018
b11a003
#211 IAT support
bkmoovio Jun 26, 2018
d63c62a
#211 Fix Reader.go megacheck issue
bkmoovio Jun 26, 2018
3d98db2
#211 reader.go govet
bkmoovio Jun 26, 2018
908b742
#211 IAT reader modifications
bkmoovio Jun 26, 2018
ecb4707
revert due to gocyclo error
bkmoovio Jun 26, 2018
32640ba
#211 reader.go
bkmoovio Jun 27, 2018
8e5fd7e
#211 Writer
bkmoovio Jun 27, 2018
682bc00
#211 iatBatch
bkmoovio Jun 27, 2018
9bfd277
#211 reader.go
bkmoovio Jun 27, 2018
5693d61
#211 Update unrelated to IAT Addenda02_test
bkmoovio Jun 28, 2018
04da511
#211 Addenda10 TransactionTypeCode
bkmoovio Jun 28, 2018
ff4db1f
# 211 Addenda10
bkmoovio Jun 28, 2018
d60b70e
#211 Addenda10 code coverage tests
bkmoovio Jun 28, 2018
4a3affb
#211 Addenda10 code coverage
bkmoovio Jun 28, 2018
6c7b568
#211 Test review modifications
bkmoovio Jun 28, 2018
ee974c3
#211 addenda11 and addenda12
bkmoovio Jun 28, 2018
736d89a
#211 Comment Changes
bkmoovio Jun 29, 2018
0fedc45
#211 Addenda 13 and Addenda14
bkmoovio Jun 29, 2018
83986e3
#211 Code Comment Modifications
bkmoovio Jun 29, 2018
a2fda03
#211 addenda15 and addenda16
bkmoovio Jun 29, 2018
4dd0517
#211 gofmt addenda16.go
bkmoovio Jun 29, 2018
7b1486d
#211 Added ToDo
bkmoovio Jun 29, 2018
967d525
#211 remove megacheck
bkmoovio Jun 30, 2018
e559bfa
#211 patseStringField Updates
bkmoovio Jun 30, 2018
908b27f
Merge pull request #30 from moov-io/master
bkmoovio Jul 9, 2018
fd91c6e
Merge branch 'master' into 211
bkmoovio Jul 9, 2018
fc73411
# 211 Continue code support for IAT
bkmoovio Jul 10, 2018
8b2a8f4
#211 gofmt
bkmoovio Jul 10, 2018
30a1029
#211 file.go gofmt
bkmoovio Jul 10, 2018
ca5da10
#211 remove batchIAT
bkmoovio Jul 10, 2018
155422f
#211 Additional Addenda Support
bkmoovio Jul 11, 2018
3b68afa
#211 Updates for reading an achfile with IAT entries
bkmoovio Jul 12, 2018
cd0669a
#211 Additional Code Coverage
bkmoovio Jul 12, 2018
385b025
#211 gofmt
bkmoovio Jul 12, 2018
b8336ac
#211 Moved batch.entries check from isCategory to verify
bkmoovio Jul 13, 2018
eaf25b4
#211 Increase Code Coverage
bkmoovio Jul 13, 2018
3e4c6de
#211 reader_test updates
bkmoovio Jul 13, 2018
6804d1b
#211 iatBatch_test
bkmoovio Jul 13, 2018
ac4331e
#211 Addenda17
bkmoovio Jul 16, 2018
23b77ac
#211 Addenda18 Support
bkmoovio Jul 17, 2018
b210a0a
#211 gofmt and govet
bkmoovio Jul 17, 2018
e144a89
#211 golint
bkmoovio Jul 17, 2018
84ea4cc
# 211 SequenceNumber adjustment
bkmoovio Jul 17, 2018
45a3257
#211 Adennda17 and Addenda18
bkmoovio Jul 17, 2018
2f84e47
#211 Add call to Validate for Addendumer
bkmoovio Jul 17, 2018
431abb6
#211 iatBatch Code Coverage
bkmoovio Jul 17, 2018
e4a2871
#211 iatBatch Code Coverage
bkmoovio Jul 17, 2018
7899679
#211 error with goveralls on github
bkmoovio Jul 17, 2018
16dec66
#211 EntryDetailSequenceNumber
bkmoovio Jul 17, 2018
a435bdc
#211 iatBatch Code Coverage
bkmoovio Jul 18, 2018
ff7a1db
#211 revert removal of goveralls
bkmoovio Jul 18, 2018
baac7a6
#211 iatBatch code coverage
bkmoovio Jul 18, 2018
80348a2
#211 iatBatch
bkmoovio Jul 18, 2018
d804427
#211 IAT Addenda Record Parsing tests
bkmoovio Jul 18, 2018
18ec18d
#211 reader_test
bkmoovio Jul 19, 2018
e21af84
#211 IAT BatchControl Test
bkmoovio Jul 19, 2018
81c3475
#211 reader_test
bkmoovio Jul 19, 2018
78c1124
#211 Removed unnecessary ToDo
bkmoovio Jul 19, 2018
3bdda84
211 writer_test
bkmoovio Jul 19, 2018
63ad758
#211 typo
bkmoovio Jul 20, 2018
0b9f31e
#211 README updates
bkmoovio Jul 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ env:
secure: QPkcX77j8QEqTwOYyLGItqvxYwE6Na5WaSZWjmhp48OlxYatWRHxJBwcFYSn1OWD5FMn+3oW39fHknReIxtrnhXMaNvI7x3/0gy4zujD/xZ2xAg7NsQ+l5buvEFO8/LEwwo0fp4knItFcBv8xH/ziJBJyXvgfMtj7Is4Q/pB1p6pWDdVy1vtAj3zH02bcqh1yXXS3HvcD8UhTszfU017gVNXDN1ow0rp1L3ainr3btrVK9izUxZfKvb7PlWJO1ogah7xNr/dIOJLsx2SfKgzKp+3H28L2WegtbzON74Op4jXvRywCwqjmUt/nwJ/Y9anunMNHT136h+ye4ziG1i/VdbWq0Q4PopQ8yYqinujG7SjfQio+wNCV2cwc2r/WjNBjbH0N9/Pflogq3RHvgy/9VtPif1tY+RrZCSntohoEZbYpVcFQFE1xDyf6xq/uLxVeEcCU33gqq7cKEfpcUgyCITa+yCPfBdtgkLBJ8h7Sew1j08D1kTKUW6g3D1epmwlCh/Z16oHG5VwSnCLGDjJy8wm/hQk1i/g7qeP7g24CfNzffzlFBCy88HhjzmrhUpcaTyfVVDf4h8wK6Zu/J3dHjHXQYwfiQRqpMa+2DYyjGgZhniccuh4GWolGZauDQdmO9SD4Ugyt9PEMk02i32ax3A4XE/Q6VNOam+qszviX3Q=
before_install:
- go get github.com/mattn/goveralls
- go get -u honnef.co/go/tools/cmd/megacheck
- go get -u github.com/client9/misspell/cmd/misspell
- go get -u golang.org/x/lint/golint
- go get github.com/fzipp/gocyclo
Expand All @@ -17,7 +16,6 @@ before_script:
script:
- test -z $(gofmt -s -l $GO_FILES)
- go vet $GO_FILES
- megacheck $GO_FILES
- misspell -error -locale US .
- gocyclo -over 19 $GO_FILES
- golint -set_exit_status $GO_FILES
Expand Down
134 changes: 130 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ ACH is under active development but already in production for multiple companies
* Return Entries
* Addenda Type Code 02
* Addenda Type Code 05
* Addenda Type Code 98
* Addenda Type Code 99


* Addenda Type Code 10 (IAT)
* Addenda Type Code 11 (IAT)
* Addenda Type Code 12 (IAT)
* Addenda Type Code 98 (NOC)
* Addenda Type Code 99 (Return)
* IAT

## Project Roadmap
* Additional SEC codes will be added based on library users needs. Please open an issue with a valid test file.
* Review the project issues for more detailed information
Expand Down Expand Up @@ -259,6 +262,129 @@ Which will generate a well formed ACH flat file.
82200000020010200101000000000000000000000799123456789 234567890000002
9000002000001000000040020400202000000017500000000000799
```

### Create an IAT file

```go
file := NewFile().SetHeader(mockFileHeader())
iatBatch := IATBatch{}
iatBatch.SetHeader(mockIATBatchHeaderFF())
iatBatch.AddEntry(mockIATEntryDetail())
iatBatch.Entries[0].Addenda10 = mockAddenda10()
iatBatch.Entries[0].Addenda11 = mockAddenda11()
iatBatch.Entries[0].Addenda12 = mockAddenda12()
iatBatch.Entries[0].Addenda13 = mockAddenda13()
iatBatch.Entries[0].Addenda14 = mockAddenda14()
iatBatch.Entries[0].Addenda15 = mockAddenda15()
iatBatch.Entries[0].Addenda16 = mockAddenda16()
iatBatch.Entries[0].AddIATAddenda(mockAddenda17())
iatBatch.Entries[0].AddIATAddenda(mockAddenda17B())
iatBatch.Entries[0].AddIATAddenda(mockAddenda18())
iatBatch.Entries[0].AddIATAddenda(mockAddenda18B())
iatBatch.Entries[0].AddIATAddenda(mockAddenda18C())
iatBatch.Entries[0].AddIATAddenda(mockAddenda18D())
iatBatch.Entries[0].AddIATAddenda(mockAddenda18E())
iatBatch.Create()
file.AddIATBatch(iatBatch)

iatBatch2 := IATBatch{}
iatBatch2.SetHeader(mockIATBatchHeaderFF())
iatBatch2.AddEntry(mockIATEntryDetail())
iatBatch2.GetEntries()[0].TransactionCode = 27
iatBatch2.GetEntries()[0].Amount = 2000
iatBatch2.Entries[0].Addenda10 = mockAddenda10()
iatBatch2.Entries[0].Addenda11 = mockAddenda11()
iatBatch2.Entries[0].Addenda12 = mockAddenda12()
iatBatch2.Entries[0].Addenda13 = mockAddenda13()
iatBatch2.Entries[0].Addenda14 = mockAddenda14()
iatBatch2.Entries[0].Addenda15 = mockAddenda15()
iatBatch2.Entries[0].Addenda16 = mockAddenda16()
iatBatch2.Entries[0].AddIATAddenda(mockAddenda17())
iatBatch2.Entries[0].AddIATAddenda(mockAddenda17B())
iatBatch2.Entries[0].AddIATAddenda(mockAddenda18())
iatBatch2.Entries[0].AddIATAddenda(mockAddenda18B())
iatBatch2.Entries[0].AddIATAddenda(mockAddenda18C())
iatBatch2.Entries[0].AddIATAddenda(mockAddenda18D())
iatBatch2.Entries[0].AddIATAddenda(mockAddenda18E())
iatBatch2.Create()
file.AddIATBatch(iatBatch2)

if err := file.Create(); err != nil {
t.Errorf("%T: %s", err, err)
}
if err := file.Validate(); err != nil {
t.Errorf("%T: %s", err, err)
}

b := &bytes.Buffer{}
f := NewWriter(b)

if err := f.Write(file); err != nil {
t.Errorf("%T: %s", err, err)
}

r := NewReader(strings.NewReader(b.String()))
_, err := r.Read()
if err != nil {
t.Errorf("%T: %s", err, err)
}
if err = r.File.Validate(); err != nil {
t.Errorf("%T: %s", err, err)
}

// Write IAT records to standard output. Anything io.Writer
w := NewWriter(os.Stdout)
if err := w.Write(file); err != nil {
log.Fatalf("Unexpected error: %s\n", err)
}
w.Flush()
```

This will generate a well formed flat IAT ACH file

```text
101 987654321 1234567891807200000A094101Federal Reserve Bank My Bank Name
5220 FF3 US123456789 IATTRADEPAYMTCADUSD010101 0231380100000001
6221210428820007 0000100000123456789 1231380100000001
710ANN000000000000100000928383-23938 BEK Enterprises 0000001
711BEK Solutions 15 West Place Street 0000001
712JacobsTown*PA\ US*19305\ 0000001
713Wells Fargo 01121042882 US 0000001
714Citadel Bank 01231380104 US 0000001
7159874654932139872121 Front Street 0000001
716LetterTown*AB\ CA*80014\ 0000001
717This is an international payment 00010000001
717Transfer of money from one country to another 00020000001
718Bank of Germany 01987987987654654 DE 00010000001
718Bank of Spain 01987987987123123 ES 00020000001
718Bank of France 01456456456987987 FR 00030000001
718Bank of Turkey 0112312345678910 TR 00040000001
718Bank of United Kingdom 011234567890123456789012345678901234GB 00050000001
82200000150012104288000000000000000000100000 231380100000001
5220 FF3 US123456789 IATTRADEPAYMTCADUSD010101 0231380100000002
6271210428820007 0000002000123456789 1231380100000001
710ANN000000000000100000928383-23938 BEK Enterprises 0000001
711BEK Solutions 15 West Place Street 0000001
712JacobsTown*PA\ US*19305\ 0000001
713Wells Fargo 01121042882 US 0000001
714Citadel Bank 01231380104 US 0000001
7159874654932139872121 Front Street 0000001
716LetterTown*AB\ CA*80014\ 0000001
717This is an international payment 00010000001
717Transfer of money from one country to another 00020000001
718Bank of Germany 01987987987654654 DE 00010000001
718Bank of Spain 01987987987123123 ES 00020000001
718Bank of France 01456456456987987 FR 00030000001
718Bank of Turkey 0112312345678910 TR 00040000001
718Bank of United Kingdom 011234567890123456789012345678901234GB 00050000001
82200000150012104288000000002000000000000000 231380100000002
9000002000004000000300024208576000000002000000000100000
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
```

# Getting Help

channel | info
Expand Down
Loading