credit-card-prompt
v0.0.1
Published
Credit card prompt with validation and address lookup
Downloads
11
Maintainers
Readme
credit-card-prompt
Credit card prompt with validation and address lookup
Install
$ npm install --save credit-card-prompt
Usage
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
Optional
If Google Maps API Key is set, it will lookup for user state
and city
using zip code.
Related
- npm-donate — Support maintainers with a donation and help them continue with activities.
License
MIT © Bu Kinoshita