npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

digitaltown-nativescript-card-io

v1.0.1

Published

Card.io nativescript plugin

Downloads

2

Readme

nativescript-card-io

nativescript-card-io provides fast, easy credit card scanning in mobile apps.

Installation

Describe your plugin installation steps. Ideally it would be something like:

tns plugin add nativescript-card-io

Usage

import { CardIo } from 'nativescript-card-io';

let cardIo = new CardIo();

cardIo.scan({
    android: {
        requireExpiry: true,
        requireCvv: true,
        requirePostalCode: false,
        returnCardImage: true
    }
}).then((result: CreditCard) => {
    console.log("RESULT >>> ", result);
}, error => {
    console.log("ERROR >>> ", error);
});

API

scan(options): Promise;

Start the scanning process

Options format

Everything that has '?' is optional

Scan Options

| Property | Description | | -------------------------- | ----------------------------------------------------- | | android?: AndroidOption | Set Android Options | | ios?: any | Set iOS Options |

Android Options

| Property | Default | Description | | ------------------------------ | ---------- | ----------------------------------------------------- | | noCamera?: boolean | Defaults to false. | If set, the card will not be scanned with the camera. | requireExpiry?: boolean | Defaults to false. | If set to false, expiry information will not be required. | unblurDigits?: number | Defaults to -1 (no blur). | How many of the Card number digits NOT to blur on the resulting image. Setting it to 4 will blur all digits except the last four. | scanExpiry?: boolean | Defaults to true. | If set to true, and requireExpiry is true, an attempt to extract the expiry from the card image will be made. | requireCvv?: boolean | Defaults to false. | If set, the user will be prompted for the card CVV. | requirePostalCode?: boolean | Defaults to false. | If set, the user will be prompted for the card billing postal code. | restrictPostalCodeToNumericOnly?: boolean | Defaults to false. | If set, the postal code will only collect numeric input. Set this if you know the expected country's postal code has only numeric postal codes. | requireCardholderName?: boolean | Defaults to false. | If set, the user will be prompted for the cardholder name. | suppressManualEntry?: boolean | Defaults to false. | Removes the keyboard button from the scan screen. | useCardioLogo?: boolean | Defaults to false. | If set, the card.io logo will be shown instead of the PayPal logo. | hideCardioLogo?: boolean | Defaults to false. | When set to true the card.io logo will not be shown overlaid on the camera. | languageOrLocale?: string | | The preferred language for all strings appearing in the user interface. If not set, or if set to null, defaults to the device's current language setting. Can be specified as a language code ("en", "fr", "zh-Hans", etc.) or as a locale ("en_AU", "fr_FR", "zh-Hant_TW", etc.). | usePaypalActionbarIcon?: boolean | | Use the PayPal icon in the ActionBar. | keepApplicationTheme?: boolean | | If this value is set to true, and the application has a theme, the theme will be set to the theme of the application. | guideColor?: string | Defaults to green. | Changes the color of the guide overlay on the camera. | suppressConfirmation?: boolean | | If this value is set to true the user will not be prompted to confirm their card number after processing. | suppressScan?: boolean | | Once a card image has been captured but before it has been processed, this value will determine whether to continue processing as usual. | returnCardImage?: boolean | | If this value is set to true the card image will be return as ImageSource

Result Option

Credit Card

| Property | Description | | ------------------ | ----------------------------------------------------- | | cardType: CardType | Get Card CardType Details | | formattedCardNumber: string | Get the formatted Card Number | | lastFourDigitsOfCardNumber: string | Get the last Four Digit on the Card Number | | redactedCardNumber: string | Get Redacted Card Number | | isExpiryValid: boolean | Get a boolean which indicate the validity of the Card | | content: string | Get the Card Details |

Card Type

| Property | Description | | ------------------ | ---------------------------------------------------------------- | | cvvLength: number | Get cvv number length (4 for Amex, 3 for others, -1 for unknown) | | displayName(languageOrLocale: string): string | Get the Card Display Name | | imageBitmap: any | Get The ImageBitmap image after scan if returnCardImage is true | | numberLength: number | Get Card Number Length e.g(15 for AmEx, -1 for unknown, 16 for others.) | | content: string | Get Card Type Details |

Author

Jonathan Mayunga, [email protected]

License

Apache License Version 2.0, January 2004