-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add advanced bank identifier validation and retrieval methods #185
base: master
Are you sure you want to change the base?
Add advanced bank identifier validation and retrieval methods #185
Conversation
|
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.
lets add this in some readme file rather than here
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.
what data is this?
const ( | ||
IdentifierTypeSWIFT = "SWIFT" | ||
IdentifierTypeRoutingNumber = "routing_number" | ||
IdentifierTypeIFSC = "IFSC" |
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.
lets keep it consistant across either all upper case or lower snake case.
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.
lets add UT's as well
Description
This feature adds advanced capabilities to handle bank identifiers, such as enhanced validation for existing identifier types and support for custom identifier formats like SWIFT, Routing Numbers, and IFSC codes. It introduces utility functions to retrieve bank details efficiently and improves error messaging for invalid cases.
Proposed solution
The system will ensure precise validation of input identifiers before processing. The changes modularize validation and retrieval logic into reusable functions. For example, introducing utility methods like
IsValidBankIdentifier
,GetBankNameFromShortCode
,GetDefaultBankIdentifiersFromShortCode
, will make the codebase more organized and extensible.Envison - A consumer of the updated library calls IsValidBankIdentifier("MY", "SWIFT", "PHBMMYKLXXX"), and the function returns true if valid, or a descriptive error if not.
Another use case: GetBankNameFromIdentifier("US", "021000021") retrieves the bank name for the routing number directly, streamlining front-end data presentation in payment forms.