Search docs/
Getting StartedPlugins

Card IO

https://github.com/card-io/card.io-Cordova-Plugin

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Contact Us Today!

Installation

ionic cordova plugin add card.io.cordova.mobilesdknpm install @ionic-native/card-ionpm install card.io.cordova.mobilesdknpm install @ionic-native/card-ioionic cap sync
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS

Usage

Using React?

See here.

This plug-in exposes card.io credit card scanning.

NOTE: If you would like to actually process a credit card charge, you might be interested in the PayPal Cordova Plug-in.

Requires Cordova plugin: card.io.cordova.mobilesdk. For more info, please see the Card IO plugin docs.

Note: For use with iOS 10 + When building your app with the iOS 10 SDK +, you have to add some info to the info.plist file. This is due to increased security in iOS 10. Go to your app directory and search for the Info.plist file. Add the following lines in the main element.

<key>NSCameraUsageDescription</key>
<string>To scan credit cards.</string>
import { CardIO } from '@ionic-native/card-io/ngx';

constructor(private cardIO: CardIO) { }

...


this.cardIO.canScan()
  .then(
    (res: boolean) => {
      if(res){
        let options = {
          requireExpiry: true,
          requireCVV: false,
          requirePostalCode: false
        };
        this.cardIO.scan(options);
      }
    }
  );