test-card

1.0.0 • Public • Published

test-card Build Status

Credit, Debit and Prepaid cards for testing.

Install

$ npm install --save test-card

Usage

const testCard = require('test-card');
 
testCard('visa');
//=> '4242424242424242'
 
testCard('meow');
//=> null
 
testCard(123);
//=> 'Expected a string, got number'

API

testCard(cardName)

cardName

Type: string

On of the below:

[ 'visa',
  'visa-debit',
  'mastercard',
  'mastercard-debit',
  'mastercard-prepaid',
  'american-express',
  'discover',
  'diners-club',
  'jcb' ]

P.S:

  • Expiry date for these cards must be some day in the future.

  • Any random CVC number.

  • Sample cards are from stripe docs.

License

MIT © Hemanth.HM

Package Sidebar

Install

npm i test-card

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • hemanth