/credit-card-component

The base for a Credit Card component in React

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Credit Card Component

Forks Stargazers Issues-open Issues-closed Contributors contributions welcome


Base for a Credit Card component in React


Report a Bug 🙋‍♂️ Request Feature

Table of Contents

discover

The Project

Card type detection using regex for a credit card form component. As managing money for programmers is important, we have to make sure things like card issuer are as the user says; also we have to take care of the looks.

This projects shows how to check dynamically for the Network issuing certain cards based on the Issuer identification number (IIN). This way we can create better user experience and take care of security issues, for example validating client-side the card number.

Based on this gist

Features

Framework

  • Using Create React App (CRA)
  • No Style Framework, only pure CSS (Looking at you Bootstrap...)
  • React-Router
  • Mobile Optimized

Run It

This project was bootstrapped with Create React App. So is already setup to be wasily developed and run.

Prerequisites

You will need Node.js version 8.0 or greater installed on your system.

Setup

Get the code by either cloning this repository using git

git clone git@github.com:Israel-Laguan/credit-card-component.git

... or downloading source code as a zip archive.

clone

Once downloaded, open the terminal in the project directory, and install dependencies with:

npm install

Then start the app with:

npm start

The app should now be up and running at http://localhost:3000 🚀

Component

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.

Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.

You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.

See the section about running tests for more information.

tests

npm run publish

Builds and then publish the app to surge.sh, in this case to http://credit-card-component.surge.sh/.

Author

Contributing

contributions welcome

🤝 Contributions, issues and feature requests are welcome! Feel free to check the issues page.

Show your support

🤗 Give a ⭐️ if you like this project!

Icons from:

Icons8

Regexs: Adapted form here Design Idea: Dribble

License

License

📝 This project is licensed under the Apache 2
Feel free to fork this project and improve it