Skip to content

Commit

Permalink
add troy card type (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
doganalper authored Jul 21, 2024
1 parent 81e13bd commit e9c3f97
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/images/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import unionpay from './unionpay.js';
import mastercard from './mastercard.js';
import placeholder from './placeholder.js';
import visa from './visa.js';
import troy from './troy.js';

export default {
amex,
Expand All @@ -17,5 +18,6 @@ export default {
unionpay,
mastercard,
placeholder,
visa
visa,
troy
};
10 changes: 10 additions & 0 deletions src/images/troy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/utils/cardTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@ export const CARD_TYPES = [
name: 'CVC',
length: 3
}
},
{
displayName: 'Troy',
type: 'troy',
format: DEFAULT_CARD_FORMAT,
startPattern: /^9792/,
gaps: [4, 8, 12],
lengths: [16],
code: {
name: 'CVV',
length: 3
}
}
];

Expand Down

0 comments on commit e9c3f97

Please sign in to comment.