Closed wadearnold closed 5 years ago
// MergeFiles is a helper function for consolidating an array of ACH Files into as few files
// as possible. This is useful for optimizing cost and network efficiency.
//
// Per NACHA rules files must remain under 10,000 lines (when rendered in their ASCII encoding)
//
// File Batches can only be merged if they are unique and routed to and from the same ABA routing numbers.
func MergeFiles(files []*File) ([]*File, error) { ... }
@wadearnold and/or @bkmoovio would you have other comments to add here?
I'm going to use some of paygate's mergeTransfer
logic and line count wrapper for this.
I think it’s good. Wade can probably chime in on if any specific additional requirements are needed. It’s great if you can leverage what you did in paygate.
A utility function should exist that takes an array of
ACH.Files
and merges them into one or many files. If the merged file exceeds the NACHA record limit limitation of 10k entries and the additional file should be created.