credit-card-prompt

0.0.1 • Public • Published

credit-card-prompt Build Status

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

/credit-card-prompt/

    Package Sidebar

    Install

    npm i credit-card-prompt

    Weekly Downloads

    5

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • bukinoshita