Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bukinoshita/credit-card-prompt
Credit card prompt with validation and address lookup
https://github.com/bukinoshita/credit-card-prompt
card command-line credit-card debit-card javascript nodejs pay payment prompt
Last synced: 24 days ago
JSON representation
Credit card prompt with validation and address lookup
- Host: GitHub
- URL: https://github.com/bukinoshita/credit-card-prompt
- Owner: bukinoshita
- License: mit
- Created: 2017-07-16T05:44:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T09:52:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T16:08:31.354Z (about 1 month ago)
- Topics: card, command-line, credit-card, debit-card, javascript, nodejs, pay, payment, prompt
- Language: JavaScript
- Homepage:
- Size: 12.6 MB
- Stars: 14
- Watchers: 3
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# credit-card-prompt [![Build Status](https://travis-ci.org/bukinoshita/credit-card-prompt.svg?branch=master)](https://travis-ci.org/bukinoshita/credit-card-prompt)
> Credit card prompt with validation and address lookup
## Install
```bash
$ npm install --save credit-card-prompt
```## Usage
```js
const creditCardPrompt = require('credit-card-prompt')creditCardPrompt()
/*
{
name: 'Bu Kinoshita',
number: 4242424242424242,
cvc: 123,
address_country: Canada,
address_zip: MK63P6,
address_state: Toronto,
address_city: res.city,
address_line1: res.address1,
exp_month: expDateParts[0],
exp_year: expDateParts[1]
}
*/
```_It uses `add-billing` from zeit under the hood with some changes._
## Demo
## API
### creditCardPrompt(googleMapsKey)
Returns a `promise`
#### googleMapsKey
Type: `string`
OptionalIf Google Maps API Key is set, it will lookup for user `state` and `city` using zip code.
## Related
- [npm-donate](https://github.com/bukinoshita/npm-donate) — Support maintainers with a donation and help them continue with activities.
## License
MIT © [Bu Kinoshita](https://bukinoshita.io)