File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## v0.24.2 (Released 2023-10-04)
2+
3+ IMPROVEMENTS
4+ - add IAT Batches to populateHashes
5+
6+ BUILD
7+ - remove zookeeper
8+
19## v0.24.1 (Released 2023-09-11)
210
311IMPROVEMENTS
Original file line number Diff line number Diff line change @@ -183,6 +183,13 @@ func populateHashes(file *ach.File) {
183183 entries [j ].ID = hash ([]byte (entries [j ].String ()))
184184 }
185185 }
186+
187+ for i := range file .IATBatches {
188+ entries := file .IATBatches [i ].GetEntries ()
189+ for j := range entries {
190+ entries [j ].ID = hash ([]byte (entries [j ].String ()))
191+ }
192+ }
186193}
187194
188195func hash (data []byte ) string {
Original file line number Diff line number Diff line change @@ -88,6 +88,17 @@ func TestProcessor_populateHashes(t *testing.T) {
8888 require .Equal (t , "389723d3a8293a802169b5db27f288d32e96b9c6" , entries [0 ].ID )
8989}
9090
91+ func TestProcessor_populateIatHashes (t * testing.T ) {
92+ file , err := ach .ReadFile (filepath .Join ("testdata" , "iat-credit.ach" ))
93+ require .NoError (t , err )
94+
95+ populateHashes (file )
96+ require .Equal (t , "" , file .IATBatches [0 ].ID )
97+
98+ entries := file .IATBatches [0 ].GetEntries ()
99+ require .Equal (t , "f26f52d2603771f52c983bf6062ba503fd126087" , entries [0 ].ID )
100+ }
101+
91102func TestProcessor_MultiReturnCorrection (t * testing.T ) {
92103 cfg := service.ODFIFiles {
93104 Processors : service.ODFIProcessors {
Original file line number Diff line number Diff line change 1+ 101 121042882 2313801041812180000A094101Bank My Bank Name
2+ 5225 FF3 US123456789 IATTRADEPAYMTCADUSD181219 1231380100000001
3+ 6221210428820007 0000100000123456789 1231380100000001
4+ 710ANN000000000000100000928383-23938 BEK Enterprises 0000001
5+ 711BEK Solutions 15 West Place Street 0000001
6+ 712JacobsTown*PA\ US*19305\ 0000001
7+ 713Wells Fargo 01231380104 US 0000001
8+ 714Citadel Bank 01121042882 CA 0000001
9+ 7159874654932139872121 Front Street 0000001
10+ 716LetterTown*AB\ CA*80014\ 0000001
11+ 717This is an international payment 00010000001
12+ 718Bank of France 01456456456987987 FR 00010000001
13+ 82250000100012104288000000000000000000100000 231380100000001
14+ 9000001000002000000100012104288000000000000000000100000
15+ 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
16+ 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
17+ 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
18+ 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
19+ 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
20+ 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
You can’t perform that action at this time.
0 commit comments