-
Notifications
You must be signed in to change notification settings - Fork 2
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
POS-1253 Allow Canadian routing numbers #125
base: master
Are you sure you want to change the base?
Conversation
e2c0d00
to
1f409b4
Compare
I believe using checksum is important for detecting fraud. Is there a way to handle this in a country-specific way? |
@jpena-cb You're correct. The reason I have to remove it is because Canadian routing numbers are sometimes 9 digits instead of 8, so there's not a reliable way to tell which type of number you're dealing with before applying validations. |
643e34e
to
83c215b
Compare
@jpena-cb Could you take another look at this PR when you get a chance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
83c215b
to
c19b85c
Compare
yarn 1.22.19 | ||
nodejs 20.17.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this, it matches the dockerfile
Tests needed to be updated to match these changes 2559d6b#diff-56017878dbd7a7cfc83c47102fb03e5116813578d085592361f7247fbc0e70a5R566 |
c19b85c
to
ac03769
Compare
ac03769
to
a8195cb
Compare
Description
The impetus for this set of changes to the Redux Freeform library are meant to allow Canadian routing numbers in the Manual Entry form used in POS Frontend. While we want to allow Canadian numbers for recording purposes, we do not need to make sure the Canadian numbers are all real routing numbers because Canadian checks cannot be processed as ACH transactions anyway. According to Greg Weppler,
So it doesn't matter if the Canadian routing numbers are for real banks because we can't process those as ACH transactions even if they were real numbers. Therefore, I've added a new validator that preserves the pre-existing checksum validation for U.S. routing numbers and adds functionality that allows Canadian numbers to be entered and recorded, but not used in any real transactions.
This new validator,
isAmericanOrCanadianRoutingNumber
can be applied to any routing number input field that wants to allow the entry of Canadian routing numbers without disrupting the validation for U.S. numbers.View in preview environment.
Risk Assessment
None. This is an update to a library that will not impact anything until its installed in POS Frontend. See https://github.com/CityBaseInc/pos-frontend/pull/526.
Changes
isAmericanOrCanadianRoutingNumber
validator.isAmericanOrCanadianRoutingNumber
validatorisAmericanOrCanadianRoutingNumber
validator to allow Canadian valuesCode of Conduct
https://github.com/CityBaseInc/redux-freeform/blob/master/CODE_OF_CONDUCT.md
Concerns
(Optional)
Screenshots
9-Digit Routing Number Checksum is Valid
9-Digit Routing Number Checksum is Invalid
Routing Number Length is Too Short
An 8-digit number is valid
Routing Number Length is Too Long