chore(POCP-1226): support 8-digit IINs in card event#270
Draft
lukasz-k-bieszczad-cko wants to merge 3 commits into
Draft
chore(POCP-1226): support 8-digit IINs in card event#270lukasz-k-bieszczad-cko wants to merge 3 commits into
lukasz-k-bieszczad-cko wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SDK’s card IIN handling to support up to 8-digit IINs, enabling more accurate issuer lookups (notably for MercadoPago installments) while preserving compatibility with existing 6-digit behavior.
Changes:
- Increase IIN extraction cap from 6 → 8 digits in
Card.getIIN. - Update
ProcessOut.getCardInformationto use up to 8 digits for theiins/{iin}lookup (minimum length remains 6). - Adjust Dynamic Checkout
restrict_to_iinsmatching from exact equality to prefix-based matching.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/processout/processout.ts | Expands IIN lookup in getCardInformation from 6 to 8 digits. |
| src/processout/card.ts | Raises Card.getIIN maximum returned length from 6 to 8 digits. |
| src/dynamic-checkout/payment-methods/card.ts | Changes restrict_to_iins allowlist evaluation to use prefix matching. |
| package.json | Bumps package version to 1.9.8. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lukasz-k-bieszczad-cko
force-pushed
the
chore/POCP-1226/allow-8-digin-inns
branch
from
July 20, 2026 06:53
6245d86 to
42ac592
Compare
Contributor
Author
Tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The PO.JS card event exposed a card's IIN capped at 6 digits. Civitatis needs 8 digits to call MercadoPago's
GET /installmentsdirectly. This widens the SDK's IIN handling to 8 digits.Solution
Card.getIINcap raised 6 → 8. Canonical IIN extractor, so the card field event and everything derived from the IIN now carries up to 8 digits. Scheme/length/format detection is prefix-based, so no behavioural change for existing 6-digit cards.getCardInformationno longer truncates its input to 6 digits before theiins/{iin}lookup - passes through up to 8. Minimum-length guard (6) unchanged.restrict_to_iins) matching changed from exact equality to prefix match, so an 8-digit card_iin still matches 6-digit allowlist entries (and vice versa). Guards against cards being wrongly blocked once the event emits 8 digits.Checklist
Jira Issue
POCP-1226