Repository navigation
Add card network, funding, prepaid, commercial, consumer, segment and subbrand keys - #272
Merged
Merged
Conversation
…bbrand keys Selector keys and method info keys for the bin data Chargehive looks up server-side: every network a card can route over (matching if any does), its funding type, the prepaid, commercial and consumer flags, the cardholder segment, and the product family within its brand (e.g. Maestro). Adds the card_unbranded scheme for cards issued without one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
method.info.card.type was vague beside method.type; the key holds how a card is funded, so it is method.info.card.funding with its own card_funding info key, card_type keeping its existing values. Its values are paymentmethod.FundingType, which gains deferred_debit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The product families the card brands identify by product code (in Pagos's data: Maestro MSI/MSO/MSB/MSW/OLS/MSS/MSM/MSG and Cirrus CIR within Mastercard, Visa Electron L and V PAY V within Visa) as CardSubbrand values for method.info.card.subbrand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Selector rules can only route cards on scheme, card brand, issuer and country. Chargehive now looks up each card's bin data server-side, which also says which networks it can route over (e.g. VISA, ACCEL, STAR), how it is funded, whether it is prepaid, commercial or consumer, its cardholder segment and its product family (e.g. Maestro within Mastercard).
method.info.card.network(matches if any of the card's networks does),method.info.card.funding(aFundingType:credit,debit,charge,deferred_debit),method.info.card.prepaid/.commercial/.consumer(true/false),method.info.card.segment(CONSUMER,BUSINESS,COMMERCIAL,GOVERNMENT),method.info.card.subbrand(aCardSubbrand:MAESTRO,CIRRUS(ATM only),VISA_ELECTRON,V_PAY). A key the bin data doesn't report is absent.card_networks(comma separated, brand's own first),card_funding,card_prepaid,card_commercial,card_consumer,card_segment;card_subbrandalready exists;card_typekeeps its existing values.CardSubbrandvalues for the product families Mastercard and Visa identify by product code.FundingTypeDeferredDebit(deferred_debit) added toFundingType.card_unbranded, a card issued without a scheme (EBT, private-label rails).Assemble fills and matches these in a follow-up; until then the keys are accepted and never match.
Test plan
go build ./...,go vetonselectorandpaymentmethod, andgo test ./...pass.🤖 Generated with Claude Code