Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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`

Optional

If 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)