Skip to content

Commit

Permalink
Add unionpay as an accepted card type
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleG43 committed Mar 6, 2024
1 parent cbd2b65 commit 444b230
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/Input/CreditCardNumber.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const EXAMPLES = {
'master-card': '5555555555554444',
discover: '6011111111111117',
jcb: '3530111333300000',
unionpay: '6262320002000067',
visa: '4111111111111111',
};

Expand Down
9 changes: 8 additions & 1 deletion src/components/Input/CreditCardNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import InputGroupText from '../InputGroup/InputGroupText';
import Input from './Input';

// runtime representation of card types for input validation
type CardType = 'visa' | 'master-card' | 'american-express' | 'discover' | 'diners-club' | 'jcb';
type CardType =
| 'visa'
| 'master-card'
| 'american-express'
| 'discover'
| 'diners-club'
| 'jcb'
| 'unionpay';

type IconName =
| 'cc-amex'
Expand Down

0 comments on commit 444b230

Please sign in to comment.