moov-io / paygate

A RESTful API enabling electronic payments to be submitted and received without a deep understanding payment file specification
http://moov.io
Apache License 2.0
129 stars 31 forks source link

set companyid using org config as first option #609

Closed jmbrown412 closed 4 years ago

jmbrown412 commented 4 years ago

This PR is a follow up to https://github.com/moov-io/paygate/issues/580. We need to set the CompanyIdentification if the organization has it configured or we use the default file based config.

codecov-io commented 4 years ago

Codecov Report

Merging #609 into master will increase coverage by 0.13%. The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #609      +/-   ##
==========================================
+ Coverage   51.75%   51.89%   +0.13%     
==========================================
  Files          95       95              
  Lines        3219     3224       +5     
==========================================
+ Hits         1666     1673       +7     
+ Misses       1201     1200       -1     
+ Partials      352      351       -1     
Impacted Files Coverage Δ
pkg/transfers/router.go 57.42% <50.00%> (-0.45%) :arrow_down:
pkg/upload/sftp.go 66.28% <0.00%> (+2.85%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 794104f...0023617. Read the comment docs.

jmbrown412 commented 4 years ago

good catch.

On Fri, Oct 23, 2020 at 12:46 PM Adam Shannon notifications@github.com wrote:

@adamdecaf commented on this pull request.

In pkg/transfers/router.go https://github.com/moov-io/paygate/pull/609#discussion_r511079829:

@@ -224,7 +224,13 @@ func CreateTransfer( return }

  • companyID := cfg.ODFI.FileConfig.BatchHeader.CompanyIdentification // TODO(adam): this will also be read from auth on the request
  • var companyID string
  • orgConfig, err := orgRepo.GetConfig(responder.OrganizationID)
  • if err == nil && orgConfig != nil {

We should check this error and bail out / log.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/moov-io/paygate/pull/609#pullrequestreview-515924042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQVI22GHT2BNQYMOV5JPHTSMHFSDANCNFSM4S42TCEQ .

-- Thank you,

Jordan Brown Senior Software Engineer jordan@moov.io moov.io 970.903.5803