Sign inSign up

moov/ach-test-harness

By moov

•Updated 8 days ago

Image
0

50K+

moov/ach-test-harness repository overview

⁠moov-io/ach-test-harness

GoDoc Build Status Coverage Status Go Report Card Apache 2 licensed

A configurable FTP/SFTP server and Go library to interactively test ACH scenarios to replicate real world originations, returns, changes, prenotes, and transfers.

Docs: docs⁠ | open api specification⁠

⁠Project Status

This project is currently under development and could introduce breaking changes to reach a stable status. We are looking for community feedback so please try out our code or give us feedback!

⁠Getting Started

We publish a public Docker image moov/ach-test-harness⁠ from Docker Hub or use this repository. No configuration is required to serve on :2222 and metrics at :3333/metrics in Prometheus format.

Pull & start the Docker image:

docker pull moov/ach-test-harness:latest
docker run -p 2222:2222 -p 3333:3333 moov/ach-test-harness:latest

Inspect your configuration file and setup some scenarios to match uploaded files.

ACHTestHarness:
  Servers:
    FTP:
      RootPath: "./data"
      Hostname: "0.0.0.0"
      Port: 2222
      Auth:
        Username: "admin"
        Password: "secret"
      PassivePorts: "30000-30009"
      Paths:
        Files: "/outbound/"
        Return: "/returned/"
    Admin:
      Bind:
        Address: ":3333"
  Responses:
    # Entries that match both the DFIAccountNumber and TraceNumber will be returned with a R03 return code.
    - match:
        accountNumber: "12345678"
        traceNumber: "121042880000001"
      action:
        return:
          code: "R03"

The full config for Responses is below:

# All populated fields must match for the action to be applied to the EntryDetail
match:
  # Match the DFIAccountNumber on the EntryDetail
  accountNumber: <string>
  amount:
    min: <integer>
    max: <integer>
    value: <integer>    # Either min AND max OR value is used
  debit: <object>       # Include this to only match on debits
  traceNumber: <string> # Exact match of TraceNumber

action:
  # Send the EntryDetail back with the following ACH change code
  correction:
    code: <string>
    data: <string>

  # Send the EntryDetail back with the following ACH return code
  return:
    code: <string>

⁠Examples

⁠Return Debits between two values
  - match:
      debit: {} # remove if you want to return Credits and Debits
      amount:
        min: 100000 # $1,000
        min: 120000 # $1,200
    action:
      return:
        code: "R01"
⁠Return a specific TraceNumber
  - match:
      # This matches ./examples/ppd-debit.ach
      traceNumber: "121042880000001"
    action:
      return:
        code: "R03"
⁠Correct an account number
  - match:
      # This matches ./examples/utility-bill.ach
      accountNumber: "744-5678-99"
    action:
      correction:
        code: "C01"
        data: "744567899"
⁠Copy all entries for a routing number
  - match:
      routingNumber: "111222337"
    action:
      copy:
        path: "/reconciliation/"

⁠Getting Help

channelinfo
Project Documentation⁠Our project documentation available online.
Twitter @moov_io⁠You can follow Moov.IO's Twitter feed to get updates on our project(s). You can also tweet us questions or just share blogs or stories.
GitHub Issue⁠If you are able to reproduce a problem please open a GitHub Issue under the specific project that caused the error.
moov-io slack⁠Join our slack channel (#ach) to have an interactive discussion about the development of the project.

⁠Supported and Tested Platforms

  • 64-bit Linux (Ubuntu, Debian), macOS, and Windows

⁠Contributing

Yes please! Please review our Contributing guide⁠ and Code of Conduct⁠ to get started! Checkout our issues for first time contributors⁠ for something to help out with.

This project uses Go Modules⁠ and uses Go 1.14 or higher. See Golang's install instructions⁠ for help setting up Go. You can download the source code and we offer tagged and released versions⁠ as well. We highly recommend you use a tagged release for production.

⁠Test Coverage

Improving test coverage is a good candidate for new contributors while also allowing the project to move more quickly by reducing regressions issues that might not be caught before a release is pushed out to our users. One great way to improve coverage is by adding edge cases and different inputs to functions (or contributing and running fuzzers⁠).

Tests can run processes (like sqlite databases), but should only do so locally.

⁠License

Apache License 2.0 See LICENSE⁠ for details.

Tag summary

Content type

Image

Digest

sha256:5ee2e69ea…

Size

44.1 MB

Last updated

8 days ago

docker pull moov/ach-test-harness