Skip to content

feat(debit_routing): Add support for 6-digit BIN fallback if 8-digit lookup returns empty records#118

Merged
prajjwalkumar17 merged 3 commits into
mainfrom
debit-routing/fallback-lookup
Jul 21, 2025
Merged

feat(debit_routing): Add support for 6-digit BIN fallback if 8-digit lookup returns empty records#118
prajjwalkumar17 merged 3 commits into
mainfrom
debit-routing/fallback-lookup

Conversation

@ShankarSinghC
Copy link
Copy Markdown
Collaborator

This pull request refactors the get_co_badged_cards_info function in src/decider/network_decider/co_badged_card_info.rs to improve error handling, enhance logging, and streamline the logic for fetching and processing co-badged card information. The changes primarily focus on retrying with a shorter BIN length when no records are found, improving readability, and reducing redundant code.

@ShankarSinghC ShankarSinghC requested a review from jagan-jaya July 18, 2025 04:45
@ShankarSinghC ShankarSinghC self-assigned this Jul 18, 2025
Copilot AI review requested due to automatic review settings July 18, 2025 04:45
@ShankarSinghC ShankarSinghC added the enhancement New feature or request label Jul 18, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds fallback logic to handle 6-digit BIN lookups when 8-digit BIN lookups return empty records in the co-badged card information retrieval process. The changes improve error handling and add logging to track when fallback occurs.

Key changes:

  • Added fallback mechanism to retry with 6-digit BIN when 8-digit lookup returns no records
  • Improved logging with info messages for fallback scenarios and debug messages for successful retrievals
  • Refactored error handling to streamline the control flow and reduce nested match statements

Comment thread src/decider/network_decider/co_badged_card_info.rs Outdated
Comment thread src/decider/network_decider/co_badged_card_info.rs Outdated
Comment thread src/decider/network_decider/co_badged_card_info.rs Outdated
Comment thread src/decider/network_decider/co_badged_card_info.rs Outdated
Comment thread src/decider/network_decider/co_badged_card_info.rs Outdated
@prajjwalkumar17 prajjwalkumar17 merged commit d34b84b into main Jul 21, 2025
5 of 6 checks passed
@prajjwalkumar17 prajjwalkumar17 deleted the debit-routing/fallback-lookup branch July 21, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants