Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

TimPetricola/Credy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Credy Build Status Gem Version Code Climate

Simple credit card generator/validator. Need a valid credit card number to sign up on a site but you don't want to use your real card? Need to validate your customers credit card?

Functionalities

  • Generates a valid number (per country/type)
  • Get information for a number
  • Check validity of a number

Installation

gem install credy

CLI usage

Generate

credy generate --country au --type visa

Get informations

credy infos 5108756163954799

Validate

credy validate 5108756163954799

Ruby usage

Generate

options {
  country: 'au',
  type:    'mastercard'
}
Credy::CreditCard.generate options

Get informations

Credy::CreditCard.infos '5108756163954799'

Validate

Credy::CreditCard.validate '5108756163954799'

Supported cards

At the moment, only a few types and countries are (partially) supported.

Types

  • americanexpress: American Express
  • bankcard: Bankcard
  • china-unionpay: China UnionPay
  • diners-club-carte-blanche: Diners Club Carte Blanche
  • diners-club-enroute: Diners Club enRoute
  • diners-club-international: Diners Club International
  • diners-club-us-ca: Diners Club United States & Canada
  • instapayment: InstaPayment
  • jcb: JCB
  • laser: Laser
  • maestro: Maestro
  • mastercard: Mastercard
  • solo: Solo
  • switch: Switch
  • visa: Visa
  • visa-electron: Visa Electron

Countries

  • au: Australia
  • ca: Canada
  • fr: France
  • pl: Poland
  • es: Spain
  • ch: Switzerland
  • uk: United Kingdom
  • us: United States

Todo

  • Add more data (see the Data source section)
  • Remove luhn validation for China UnionPay and Diners Club enRoute

Data source

All data is coming from the Bank card number page and the now deleted List of Issuer Identification Numbers on Wikipedia. I do not assume the responsibility for wrong data.

License

Credy is released under the MIT License.

About

Simple credit card generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages