Giter VIP home page Giter VIP logo

card.io-cordova-plugin's Introduction

card.io plug-in for Cordova

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.

Maintenance of this repository

If you discover a problem here, please submit an Issue or Pull Request. (Unless, of course, the problem is actually in the underlying card.io SDK for either iOS or Android. We're always interested in discovering and fixing bugs in our SDKs!)

Supported configurations

The card.io Cordova plugin provides different configurations that could be set according to your requirements. Here are the list of supported configurations.

Configuration Type Description
requireExpiry Boolean Expiry information will not be required.
requireCVV Boolean The user will be prompted for the card CVV
requirePostalCode Boolean The user will be prompted for the card billing postal code.
suppressManual Boolean Removes the keyboard button from the scan screen.
restrictPostalCodeToNumericOnly Boolean The postal code will only collect numeric input. Set this if you know the expected country's postal code has only numeric postal codes.
keepApplicationTheme Boolean The theme for the card.io Activity's will be set to the theme of the application.
requireCardholderName Boolean The user will be prompted for the cardholder name
scanInstructions String Used to display instructions to the user while they are scanning their card.
noCamera Boolean If set, the card will not be scanned with the camera.
scanExpiry Boolean If scanExpiry is true, an attempt to extract the expiry from the card image will be made.
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.
guideColor String Changes the color of the guide overlay on the camera. The color is provided in hexadecimal format (e.g. "#FFFFFF")
suppressConfirmation Boolean The user will not be prompted to confirm their card number after processing.
hideCardIOLogo Boolean The card.io logo will not be shown overlaid on the camera.
useCardIOLogo Boolean The card.io logo will be shown instead of the PayPal logo.
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.

Integration instructions

The card.io Cordova Plugin adds support for the CardIO iOS and android platform. It uses the native CardIO library. Cordova plugin management will set up all the required capabilities/frameworks for the project. The only bit left for you to do is to add necessary files, as described below.

  1. Follow the official Cordova documentation to install command line tools.
  2. Create project, add plugin and platforms:
   $ cordova create ScanCard com.mycompany.scancard "ScanCard"
   $ cd ScanCard
   $ cordova platform add ios
   $ cordova platform add android
   $ cordova plugin add https://github.com/card-io/card.io-Cordova-Plugin
  1. Follow Your app integration section below.
  2. Run cordova run ios or cordova run android to build and the project.

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 <your app name>Info.plist file. Add the following lines in the main <dict> element.

      <key>NSCameraUsageDescription</key>
      <string>To scan credit cards.</string>

If you have a different way to edit .plist files - plugins etc. - you can do that.

Sample HTML + JS

  1. In ScanCard/www/index.html add the following to lines after <p class="event received">Device is Ready</p>:
      <button id="scanBtn"> Scan Now!</button>
  1. Replace ScanCard/www/js/index.js with the following code:
    /*
     * Licensed to the Apache Software Foundation (ASF) under one
     * or more contributor license agreements.  See the NOTICE file
     * distributed with this work for additional information
     * regarding copyright ownership.  The ASF licenses this file
     * to you under the Apache License, Version 2.0 (the
     * "License"); you may not use this file except in compliance
     * with the License.  You may obtain a copy of the License at
     *
     * http://www.apache.org/licenses/LICENSE-2.0
     *
     * Unless required by applicable law or agreed to in writing,
     * software distributed under the License is distributed on an
     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     * KIND, either express or implied.  See the License for the
     * specific language governing permissions and limitations
     * under the License.
     */
    var app = {
        // Application Constructor
        initialize: function() {
            this.bindEvents();
        },
        // Bind Event Listeners
        //
        // Bind any events that are required on startup. Common events are:
        // 'load', 'deviceready', 'offline', and 'online'.
        bindEvents: function() {
            document.addEventListener('deviceready', this.onDeviceReady, false);
        },
        // deviceready Event Handler
        //
        // The scope of 'this' is the event. In order to call the 'receivedEvent'
        // function, we must explicitly call 'app.receivedEvent(...);'
        onDeviceReady: function() {
            app.receivedEvent('deviceready');
        },
        // Update DOM on a Received Event
        receivedEvent: function(id) {
            var parentElement = document.getElementById(id);
            var listeningElement = parentElement.querySelector('.listening');
            var receivedElement = parentElement.querySelector('.received');

            listeningElement.setAttribute('style', 'display:none;');
            receivedElement.setAttribute('style', 'display:block;');

            console.log('Received Event: ' + id);

            app.example();
        },

        example : function () {
          var cardIOResponseFields = [
            "cardType",
            "redactedCardNumber",
            "cardNumber",
            "expiryMonth",
            "expiryYear",
            "cvv",
            "postalCode"
          ];

          var onCardIOComplete = function(response) {
            console.log("card.io scan complete");
            for (var i = 0, len = cardIOResponseFields.length; i < len; i++) {
              var field = cardIOResponseFields[i];
              console.log(field + ": " + response[field]);
            }
          };

          var onCardIOCancel = function() {
            console.log("card.io scan cancelled");
          };

          var onCardIOCheck = function (canScan) {
            console.log("card.io canScan? " + canScan);
            var scanBtn = document.getElementById("scanBtn");
            if (!canScan) {
              scanBtn.innerHTML = "Manual entry";
            }
            scanBtn.onclick = function (e) {
              CardIO.scan({
                  "requireExpiry": true,
                  "requireCVV": false,
                  "requirePostalCode": false,
                  "restrictPostalCodeToNumericOnly": true
                },
                onCardIOComplete,
                onCardIOCancel
              );
            }
          };

          CardIO.canScan(onCardIOCheck);
        }
    };

    app.initialize();

Another javascript implementation example.

      document.addEventListener('deviceready', scanCreditCard, false);

      function scanCreditCard(){
        CardIO.canScan(onCardIOCheck);

        function onCardIOComplete(response) {
          var cardIOResponseFields = [
            "cardType",
            "redactedCardNumber",
            "cardNumber",
            "expiryMonth",
            "expiryYear",
            "cvv",
            "postalCode"
          ];

          var len = cardIOResponseFields.length;
          alert("card.io scan complete");
          for (var i = 0; i < len; i++) {
            var field = cardIOResponseFields[i];
            alert(field + ": " + response[field]);
          }
        }

        function onCardIOCancel() {
          alert("card.io scan cancelled");
        }

        function onCardIOCheck(canScan) {
          alert("card.io canScan? " + canScan);
          var scanBtn = document.getElementById("scanBtn");
          if (!canScan) {
            scanBtn.innerHTML = "Manual entry";
          }

          scanBtn.addEventListener("click", function(e) {      
            CardIO.scan({
              "requireExpiry": true,
              "scanExpiry": true,
              "requirePostalCode": true,
              "restrictPostalCodeToNumericOnly": true,
              "hideCardIOLogo": true,
              "suppressScan": false,
              "keepApplicationTheme": true
            } , onCardIOComplete, onCardIOCancel);
          });
        }
      }

Contributing

Please read our contributing guidelines prior to submitting a Pull Request.

License

Please refer to this repo's license file.

card.io-cordova-plugin's People

Contributors

arian-kh avatar bluk avatar braebot avatar burnto avatar engincancan avatar lkorth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

card.io-cordova-plugin's Issues

"plugin_not_install" error message on Ionic2

Required Information

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.45
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 8.1
Node Version: v5.10.1
Xcode version: Not installed

  • Platforms iOS and Android
  • Device OS Version and Device Nexus 5x

Issue Description

I have tried this in Ionic.

CardIO.canScan()
.then(
(res: boolean) => {
if(res){
let options = {
requireExpiry: true,
requireCCV: false,
requirePostalCode: false
};
CardIO.scan(options);
}
}
);`

The message that I got from my mobile phone is "plugin_not_install".
Not sure what I do wrong.

I tried the same method with other plugin like "Camera", and it works fine.

Thanks,
Punleu

works only on embossed card numbers (not printed cards)

Required Information

  • Mode (Mock/Sandbox/Live): Live
  • Cordova Plugin Version: 5.4.0
  • Platforms (iOS/Android/Both): Android
  • Device OS Version and Device (iOS 9.x on an iPhone 6, Android Marshmallow on Nexus 6, etc.): Android Marshmallow
  • PayPal-Debug-ID(s) (from any logs):

Issue Description

It runs fine but ONLY recognizes numbers from embossed cards.
If the numbers are printed, card does not scan at all. neither does it log any errors/timeouts.

window.plugins.card_io.scan() not being called?

What could be the problem? I can't get the scanner to call. I'm using Cordova 2.9.0.

I have added the CardIO folder to the Xcode project, added required frameworks and the linker flag.

I think it is a plugin problem that I am doing something wrong. But I can't figure it out. I have added the two (.h and .m) files to the Plugins folder 'in Xcode'. Added required in config.xml. Added the js file and linked it in HTML.

As I don't know where the problem is I cant provide all the code in detail. If anyone can specify what could actually be causing the issue, I can provide the corresponding code for you guys to have a look.

Linker Error with PhoneGap plugin

Can not find coreFoundation error. I added CoreFoundation.Framework but that did not help. I loaded the latest copy of the plugin and IOS SDK. I am using Xcode 4.6.2 and phonegap 2.6. Any help is appreciated.

Thanks!
Howard

When setting the guideColor Android requires an Int value, while iOS supports an hexa color (#AABBCC)

Required Information

  • Cordova Plugin Version: 2.1.0
  • Platforms (iOS/Android/Both): Both
  • Device OS Version and Device (iOS 9.x on an iPhone 6, Android Marshmallow on Nexus 6, etc.): Android 6 - iOS 10

Issue Description

NOTE: This was already fixed in #44, but never integrated. Adding the issue just for reference.

When setting the guideColor Android requires an Int value, while iOS supports an hexa color. In my Ionic app, we had to do the following

var scanSettings = {
    guideColor: ionic.Platform.isIOS() ? '#18CDAD' : 1625517, // #18cdad to int
}

This can be verified in the Android SDK in this line.

Thanks in advance!

Problem adding CardIOPGPLugin to config.xml

In the README file there is an instruction to modify the config.xml like so:

Add the following to config.xml, under the plugins tag:

It looks like there's something missing here. I've tried adding:
<gap:plugin name="CardIOPGPlugin" />
but that breaks the entire build.

Am I missing something obvious?

Thanks

suppressConfirmation bug on Android

General information

  • SDK/Library version:
  • Platforms: Android only
  • Device OS Version and Device: Android 6, Sony Xperia X

Issue description

If suppressConfirmation configuration option is set to true scan result will fail with error code 13274388 returned (fail callback). No such problem with iOS, only on Android.

Add additional Fields

Can I add additional fields beyond expires, CVV and Zip to the cardio display? The ones I would like to include are address fields.

Thanks!

noCamera flag is opposite on iOS

Required Information

  • Mode (Mock/Sandbox/Live):
  • Cordova Plugin Version: 2.0.1
  • Platforms (iOS/Android/Both): iOS
  • Device OS Version and Device: iOS 9.3 on iPhone 6 Plus
  • PayPal-Debug-ID(s) (from any logs):

Issue Description

Expected Results:

CardIO.scan({"noCamera": true }); // Results in camera not being used, manual entry instead
CardIO.scan({"noCamera": false }); // Results in camera being used

Actual Results:

CardIO.scan({"noCamera": true }); // Results in camera being used
CardIO.scan({"noCamera": false }); // Results in camera not being used, manual entry instead

cardholderName is not returned

Required Information

  • Mode (Mock/Sandbox/Live):
  • Cordova Plugin Version: 2.0.1
  • Platforms (iOS/Android/Both): Both
  • Device OS Version and Device: iOS 9.x on iPhone 6 Plus, Android 5.0 on Galaxy S5
  • PayPal-Debug-ID(s) (from any logs):

Issue Description

The cardholder name is not returned on iOS or Android.

CardIO.scan({
    "requireCardholderName": true,
},
function (result) {
    console.log(result.cardholderName); // is null
});

Help with implementation

Hi,
I'm having some trouble implementing this plugin. I done everything like the Integration instructions but I can't extract the information form the card like expiration, cvv, etc...

Can you help me?
Sorry if this is something really simple, but I'm quite new with javascript and PhoneGap and I'm still learning.

card.io Android Crosswalk issue

Hi,

We have installed the Card.IO Cordova SDK. However, once plugin is installed we received the following issue in our Android version:

image

image 1

Once we remove the plugin the following issue is disappeared.

What may be the reason for this issue?

Thanks,
Yoav

onCardIOCancel not working

onCancel function not calling. I think because of sendFailureTo function returns CDVCommandStatus_OK. Eitherway it returns to successCallback.

Thanks

Confict with CardIo plugin and Paypal payment plugin

I'm using scan card (cardIO) plugin on my app and I have some call to the scan within my index.js in order to scan card that will not be used with a paypal account and it works like a charm.

BUT
I need to install the paypal plugin but as paypal plugin comes now with carIo library I get duplicate error : duplicate symbol _CardIOCurrentScanningOrientatio when I run the cordova build ios and.. the build failed.

I tried to remove the cardIO plugin but I get error on my app : Can't find variable: CardIO

Is it a way to use the both plugin ?

If you have any idea, tell me..

Capture Image Return Path

Hi,

This is not a bug/issue but I need the captured image path, How to do this, any Idea? Please help.

iOS asks for NSPhotoLibraryUsageDescription

General information

  • SDK/Library version: card.io.cordova.mobilesdk 2.1.0
  • Platforms: IOS
  • Device OS Version and Device: Generic iOS device

Issue description

I have cordova app with only this plugin using camera installed. It work's well on the device, but when I trying to submit build into AppStore I get this mail from Apple:

"Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data."

I know how to set plist key, but I don't want to confuse app users because my app didn't use photo library(I hope plugin didn't use it too). How to avoid this error without setting photo library usage description?

can't get the sample to work

Cordova Plugin Version: 6.4.3 phonegap build
Platforms (iOS): IOS
Device OS Version and Device : 10.2.1
Plugin version: 2.1.0

I'm using phonegap 6.4.3. I've followed the sample code example to the letter and run the app on my iPhone via xcode without error. However clicking the button does absolutely nothing. I've tried both js sample code independently. Other plugins I've tried have worked, this is the first one I've run into trouble with.

Just wondering if someone has a simple reason why this might be.

Thanks

Ionic 2 card.io cordova plugin doesn't work

General information

IONIC INFO
global packages:
@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.2.1
System:
Node : v6.10.3
OS : Windows 10
Xcode : not installed
ios-deploy : not installed
ios-sim : not installed
npm : 3.10.10

Cordova Plugin Version: @ionic-native/[email protected]
Platform: Android
Device OS Version and Device: Nexus 6P, Android version 6.0.1

Issue description

Hi,
I followed all the instruction steps, installed the cordova plugin card.io as
described in https://github.com/card-io/card.io-Cordova-Plugin.

Here is my code handle camera scan :

model = {
  cardType: '',
  cardNumber: '',
  cardholderName: '',
  expiryMonth: '',
  expiryYear: '',
  expireDate: ''
}

carNumber: string = '';
expireDate: string = '';


setCardData(data: any) {
  this.model.cardType = data.cardType;
  this.model.cardholderName = data.cardholderName;
  this.model.cardNumber = data.cardNumber;
  this.model.expiryMonth = data.expiryMonth;
  this.model.expiryYear = data.expiryYear;
  this.model.expireDate = data.expiryMonth +"/"+ data.expiryYear;
}

scanButton() {

  this.cardIO.canScan()
    .then(
      (res: boolean) => {
        if(res){
          let options = {
            requireExpiry: true,
            requireCardholderName: true,
            scanExpiry: true
          };
          return this.cardIO.scan(options);
        }
      }
    )
    .then(res => {
      console.log(res);
      this.setCardData(res);
    }, err => {
      alert(err);
    });
}

I have tested on Samsung S7, but it doens't work.
I click button scanButton, the camera started to scan the credit card, then nothing happens or any data response.
Could someone take a look and help me please?

Regards,
Lam

cordova plugin issue - credit card scan didn't complete

Required Information

  • Cordova Plugin Version: card.io.cordova.mobilesdk 2.1.0
  • Platforms (iOS/Android/Both): ios 10.x
  • Device OS Version and Device (iOS 9.x on an iPhone 6, Android Marshmallow on Nexus 6, etc.):

Issue Description

Hi,
I followed all the instruction steps, installed the cordova plugin card.io and made a sample project as
described in https://github.com/card-io/card.io-Cordova-Plugin - Sample HTML + JS
Then, i tried to scan a credit card image.
The Camera started to scan the image.
However, the scanning didn't complete and it didn't reach to the callback onCardIOComplete.
Instead, it continue to display the scanning screen.

Please assist
Thanks,
Yoav

ERROR: Method 'canScan:' not defined in Plugin

I am keep getting below error. I have used phonegap 3 and have done all steps listed out in readme file.

ERROR: Method 'canScan:' not defined in Plugin 'CardIOPGPlugin'
-[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [
"CardIOPGPlugin1463527770",
"CardIOPGPlugin",
"canScan",
[

]
]

card.io Partner setup

We are planning to use card.io for one of the apps coming soon from us. But I don't find initial setup process with card.io and pricing details anywhere on top of this integration. Where can I find those details?

Plugin cannot capture credit card numbers that are printed but not engraved.

Required Information

  • Mode (Mock/Sandbox/Live): Sandbox
  • Cordova Plugin Version: 2.01
  • Platforms (iOS/Android/Both): iOS
  • Device OS Version and Device (iOS 9.x on an iPhone 6, Android Marshmallow on Nexus 6, etc.): iOS 9 on iPhone 5
  • PayPal-Debug-ID(s) (from any logs): N/A

Issue Description

Some of the new cards including Discover and Citibank Costco Visa do not have card numbers engraved on them. Instead they are printed. Banks are printing them because they no longer need to take card impressions. The plugin cannot capture these numbers by scanning. Is there a way to get around it so that users do not have to manually enter their card numbers?

Documentation is not updated

I took latest of this plugin, on each of the input field of my form. when I have given camera icon for it.
Not sure why onCardIOComplete is not getting called when I hit done.

Please modify documentation and provide the example

suppressScan config does not work on iOS

Required Information

  • Mode (Mock/Sandbox/Live): Live
  • Cordova Plugin Version: 2.0.2
  • Platforms (iOS/Android/Both): Both
  • Device OS Version and Device (iOS 9.x on an iPhone 6, Android Marshmallow on Nexus 6, etc.): iOS 9.3.5
  • PayPal-Debug-ID(s) (from any logs):

Issue Description

Please include as many details (logs, steps to reproduce, screenshots, frameworks/dependencies) as you can to help us reproduce this issue faster.

I've attempted to test the "suppressScan": true for iOS, but it doesn't seem to work. Checking https://github.com/card-io/card.io-Cordova-Plugin/blob/master/src/ios/CardIOCordovaPlugin.m file, I don't see the suppressScan variable there. I think it's simply adding this config boolean and verifying that the iOS source is referenced correctly.

I tested this on Android and it works fine.

"scanInstructions" stops either manual or camera entry on iOS 10.1

Required Information

  • Cordova Plugin Version: card.io.cordova.mobilesdk 2.1.0 "CardIO"
  • Platforms (iOS/Android/Both): Development on both, but bug only on iOS
  • Device OS Version and Device: iOS 10.1 (14B72) on iPhone 6s Plus

Issue Description

CardIO.scan({
...
"scanInstructions": true // or false, doesn't matter
})

By stating the above option, on my iPhone at least, it will NOT load the CardIO UI (camera or manual entry).

If I remove that option, it works without changing anything else (note I have checked the iOS 10 plist requirements and they are fine).

I have no logs as nothing is logged when I ask for it to load, it just doesn't load. Running the same test (with/without scanInstructions) on Android makes no difference, Android phone worked fine.

I know it's a bit vague but there just isn't much else I can give.

Production build fails for ionic framework v2

General information

  • SDK/Library version: 2.1.0
  • Platforms: iOS/Android/Both
  • Framework: ionic framework 2.2.1

Issue description

"ionic run android --prod --device" fails with following error

pickmyride@ ionic:build /Users/pradip/Projects/PickMyRide
ionic-app-scripts build "--prod" "--device"

[09:40:33] ionic-app-scripts 1.0.0
[09:40:33] build prod started ...
[09:40:33] clean started ...
[09:40:33] clean finished in 6 ms
[09:40:33] copy started ...
[09:40:33] ngc started ...
can't resolve module @ionic-native/core from /Users/pradip/Projects/PickMyRide/node_modules/@ionic-native/card-io/index.d.ts
[09:40:38] build prod failed: Cannot read property 'Plugin' of undefined, resolving symbol CardIO in
/Users/pradip/Projects/PickMyRide/node_modules/@ionic-native/card-io/index.d.ts
[09:40:38] ionic-app-script task: "build"
[09:40:38] Error: Cannot read property 'Plugin' of undefined, resolving symbol CardIO in
/Users/pradip/Projects/PickMyRide/node_modules/@ionic-native/card-io/index.d.ts
Error: Cannot read property 'Plugin' of undefined, resolving symbol CardIO in /Users/pradip/Projects/PickMyRide/node_modules/@ionic-native/card-io/index.d.ts
at simplifyInContext (/Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler-cli/src/static_reflector.js:475:23)
at StaticReflector.simplify (/Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler-cli/src/static_reflector.js:478:22)
at StaticReflector.annotations (/Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler-cli/src/static_reflector.js:60:36)
at NgModuleResolver.resolve (/Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler/bundles/compiler.umd.js:14261:46)
at CompileMetadataResolver._loadNgModuleMetadata (/Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler/bundles/compiler.umd.js:14646:45)
at CompileMetadataResolver.getUnloadedNgModuleMetadata (/Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler/bundles/compiler.umd.js:14636:23)
at addNgModule (/Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler/bundles/compiler.umd.js:12944:43)
at /Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler/bundles/compiler.umd.js:12957:16
at Array.forEach (native)
at _createNgModules (/Users/pradip/Projects/PickMyRide/node_modules/@angular/compiler/bundles/compiler.umd.js:12956:28)

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "ionic:build" "--" "--prod" "--device"
npm ERR! node v7.4.0
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! pickmyride@ ionic:build: ionic-app-scripts build "--prod" "--device"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pickmyride@ ionic:build script 'ionic-app-scripts build "--prod" "--device"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pickmyride package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ionic-app-scripts build "--prod" "--device"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs pickmyride
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls pickmyride
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/pradip/Projects/PickMyRide/npm-debug.log

package.json

"dependencies": {
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/platform-server": "2.2.1",
"@ionic-native/card-io": "^3.5.0",
"@ionic-native/core": "^3.4.4",
"@ionic-native/dialogs": "^3.4.4",
"@ionic-native/firebase": "^3.4.4",
"@ionic-native/push": "^3.4.4",
"@ionic/app-scripts": "1.0.0",
"@ionic/storage": "1.1.7",
"angular2-progressbar": "^0.5.1",
"firebase": "3.6.6",
"geofire": "4.1.2",
"ionic-angular": "2.0.1",
"ionic-native": "2.2.11",
"ionic2-rating": "1.0.0",
"ionicons": "3.0.0",
"localforage": "1.4.0",
"ng2-cordova-oauth": "0.0.8",
"rxjs": "5.0.0-beta.12",
"whatwg-fetch": "2.0.2",
"zone.js": "0.6.26"
},
"devDependencies": {
"@ionic/app-scripts": "1.1.0",
"typescript": "2.0.9"
},

UWP Solution Inbound?

Required Information

  • Platforms (UWP)

Issue Description

Is a UWP solution on the roadmap?

IOS crashed as soon as cardIO.scan is called

Required Information

  • Cordova Plugin Version: 6.10 or 6.5.0 with phonegap build
  • Platforms (iOS): IOS
  • Device OS Version and Device : 10.2
  • Plugin version: 2.01 and 2.1.0
  • Framework: Onsen + AngularJS 1.x

Issue Description

On ios, As soon as the cardio.scan() is called, the app crashed. it just closed and went to the home screen without any message. Anyone know what's going on? thanks in advance

Card.io interface appears, camera not working though.

Required Information

  • Cordova Version: 6.3.1
  • Plugin Version: 2.1.0
  • Platforms: iOS
  • Device OS Version and Device: iOS 10.0 on iPhone 6s Plus

Issue Description

The canScan function returns "true" and the Card.io interface pops up when I tap the scan button, but the camera seems to be disabled because it doesn't work. I've tried setting the noCamera option to false, but it doesn't seem to fix the issue. Other options like the hideCardIOLogo : false works.

The Card.io interface shows the block where the camera view is supposed to be, the "Cancel" button, and the "Enter Manual" button. Neither of the buttons work though. If I check the logs in Xcode an error message appears the moment I take the Scan button. The error: shows a bunch of gibberish codes and at the end of the line "Thread : signalSIGABRT

Any ideas of what could be wrong? Do I have to enable the camera? (I never got a pop-up asking to allow camera usage) Do I have to add the camera plugin?

canScan return:
img_0454

Card.io interface:
img_0455

Xcode logs:
xcode

Continuing support?

Build breaks for iOS 8 builds. Also breaks on the latest card.io SDK (errors on product key). Is this repository going to be continually maintained by the card.io team?

I've fixed the issues in the repo linked below, along with the ability to install using cordova plugin add. We'll also be adding android support fairly soon. Let me know if you'd like to get these changes into this repository.

https://github.com/TryScratch/Card.io-SDK-Phonegap

Crash app on iOS 8.1

the Card.IO SDK only run well on iOS 7.1, it always crashes when we use iOS 8.1.

The functions we is running across issue are either scanning credit card or entering manually, the app will crash and close immediately when we use these functions.

This is error message

Trying to dismiss the presentation controller while transitioning already. (<_UIFullscreenPresentationController: 0x1741dc980>)
2014-10-02 11:15:45.768 Scan Card[1300:508235] transitionViewForCurrentTransition is not set, presentation controller was dismissed during the presentation? (<_UIFullscreenPresentationController: 0x1741dc980>)

phonegap in ios

hi ,everyone.
I'm trying to develop an iOS App using phonegap 3.0. The app uses sharekit plugin and GAPlugin for phonegap, and it was working when I was using phonegap 2.9 After the upgrade it compiles and when I try to access the functions in the plugin, it gives me this error.

ERROR: Method 'show_loading:' not defined in Plugin 'CDVLogger'
-[CDVCommandQueue executePending] [Line 158] FAILED pluginJSON = [
"CDVLogger1023021198",
"CDVLogger",
"show_loading",
[

]
]
I changed how to solve this problem?,thanks。

Question : How to use card.io for android app with cordova

Dear,
I have a problem when using this plugin.
After i install, i can able to open the camera, but after that nothing happen, even though i tried with other visa cards and i use also visa card on google but it still not able to capture or get any information from these credit cards.
So, my question here about : Does i need to install any other plugin and any way to use it or just install this plugin is enough?
Because i tried to use also example code of this plugin, but it still show the camera to me and nothing next.
I really need your support.
Thanks.

Compile Error

I'm gettting a compile error trying to build this for iOS:
src/ios/CardIOCordovaPlugin.m
line 200
"matchedString" is undeclared.

Changing it to "hexColor" fixed the problem for me

CardIO fails to execute callback

@hsmith825 i am moving this into another issue, please comment here.

Hi Romln,

I ran into another problem that I was wondering if you could help me with.
I hang with the following showing on the console.log. cardio does not
return to either onCardIOComplete or onCardIOCancel.
2013-07-03 18:57:09.448 flickitt22[21930:907] Warning: Attempt to present
<CardIOPaymentViewController: 0x21313420> on <MainViewController:
0x1d82ff10> while a presentation is in progress!

2013-07-03 18:57:54.470 flickitt22[21930:907] card.io received unexpected
callback (expected from <CardIOPaymentViewController: 0x21313420>, received
from <CardIOPaymentViewController: 0x1c5725f0>

My javascript (which has worked on an earlier version of the phonegap cardio
plugin is as follows:

function oncreditbutton()

    {

       var onCardIOComplete = function(response) {

                          console.log("onCardIOComplete, Just after

window.plugins.card_io.scan");

                                  }

       var onCardIOCancel = function() {

  console.log("card.io scan cancelled");

};
console.log("Just before window.plugins.card_io.scan");

    window.plugins.card_io.scan(

"df730835ee364eada2d2e1a18c5b5083",

{

"collect_expiry": true,

"collect_cvv": true,

"collect_zip": true,

"shows_first_use_alert": false,

"disable_manual_entry_buttons": false

},

onCardIOComplete,

onCardIOCancel

);

   }

I really appreciate any help you can provide.

howard

cordova plugin issue on Android - credit card scan didn't complete

Required Information

Cordova Plugin Version: card.io.cordova.mobilesdk 2.1.0
Platform: Android
Device OS Version and Device: Nexus 6P, Android version 6.0.1

Issue Description

Hi,
I followed all the instruction steps, installed the cordova plugin card.io as
described in https://github.com/card-io/card.io-Cordova-Plugin.
Then i did the following steps:

  1. I scanned a credit card.
  2. The camera started to scan the credit card.
  3. The scanning completed successfully and opened Card Details screen with the credit card image, contains the scanned number.
  4. I pressed on Done button
  5. The Card Details screen closed and it returned to the camera scan screen, instead of reaching to onCardIOComplete callback.

This issue happens only on Android. in iOS all worked fine and it reached onCardIOComplete callback.

I did some research in the existing issues and it seems that you had already related close issue:
https://github.com/card-io/card.io-Cordova-Plugin/pull/44/commits

Unfortunately, the fix to this issue isn't included in the last stable version of card.io.cordova.mobilesdk 2.1.0

When will you release new cordova plugin version with fix to this issue?

Please assist
Thanks,
Yoav

ionic 2 problem .please help

scan camera is open but not get any value in console .also not enter inside CardIO.scan function
my code :
import { CardIO } from 'ionic-native';

scancard():any{
CardIO.canScan().then((res: boolean) => {
console.log('begin');
if (res) {

let options = {
requireCardholderName: true,
requireExpiry: true,
requireCCV: true,
requirePostalCode: true,
scanInstructions: "Scan your card",
scanExpiry: true,
scanCardHolderName: true,
keepApplicationTheme:true,
guideColor: '#12be76',
hideCardIOLogo: true,
useCardIOLogo:false,
};

CardIO.scan(options).then((data) => {
console.log("begin Scan");
console.log(data);
alert(data);

}, err => {
console.log("Error message :" + err);
// An error occurred
});
}

  });

}
///any help

Error: Cannot set property 'text' of null

Required Information

  • Mode (Mock/Sandbox/Live): Sandbox
  • Cordova Plugin Version: 2.0.2
  • Platforms (iOS/Android/Both): iOS/Android
  • Device OS Version and Device (iOS 9.x on an iPhone 6, Android Marshmallow on Nexus 6, etc.): iOS 9.x on an iPhone 6
  • PayPal-Debug-ID(s) (from any logs):

Issue Description

Please include as many details (logs, steps to reproduce, screenshots, frameworks/dependencies) as you can to help us reproduce this issue faster.

I am trying to use this plugin with my cordova application.

I am getting the following error when I tried to add the plugin

Ravis-MacBook-Pro:medlio-mobile.cordova-v4 medlio$ cordova plugin add https://github.com/card-io/card.io-Cordova-Plugin
Fetching plugin "https://github.com/card-io/card.io-Cordova-Plugin" via git clone
Repository "https://github.com/card-io/card.io-Cordova-Plugin" checked out to git ref "master".
Installing "card.io.cordova.mobilesdk" for android
 Using this version of Cordova with older version of cordova-android is being deprecated. Consider upgrading to [email protected] or newer.
Installing "card.io.cordova.mobilesdk" for ios
 Using this version of Cordova with older version of cordova-ios is being deprecated. Consider upgrading to [email protected] or newer.
Error: Cannot set property 'text' of null

phonegap in ios

hi,everyone.I'm trying to develop an iOS App using phonegap 3.0. it gives me this error.
ERROR: Method 'hidden_Acticity:' not defined in Plugin 'GSPlugin'
-[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [
"GSPlugin349115290",
"GSPlugin",
"hidden_Acticity",
[

]
]
This is my code:
https://github.com/dengfeng520/GSPlugin
So how can I solve this problem,thanks。

How to add additional fields for name

Hi, I would like to know if there is any way to add an extra field, in particular the cardholders' name. I would like to add this field on the form displayed after a successful scan of a card. Any ideas?

Cordova Android on Ionic Requires alert to activate the scanner before CardIO.canScan

Required Information

  • Mode (Mock/Sandbox/Live): Sandbox
  • Cordova Plugin Version: card.io.cordova.mobilesdk 2.0.2 "CardIO"
  • Platforms (iOS/Android/Both): Android
  • Device OS Version and Device (iOS 9.x on an iPhone 6, Android Marshmallow on Nexus 6, etc.): 5.1.1 and 6.1
  • PayPal-Debug-ID(s) (from any logs): N/A

Issue Description

I am using Ionic platform.
Unless I put an alert before the CardIO.canScan the camera scans the card or form can take a manual entry but doesn't return anything. It seems like the alert triggers some event that invokes the scanner's complete capability. I tried using other methods such as consoles.log or $cordovaDialogs.beep(3) so that I don't have to use an alert but no success. The issue is only for Android not any other platform.

CardIO.scan({
"collect_card_number": true,
"collect_expiry": false,
"requireExpiry": false,
"collect_cvv": false,
"requireCVV": false,
"collect_zip": false,
"shows_first_use_alert": true,
"disable_manual_entry_buttons": false,
"keepApplicationTheme":true,
"useCardIOLogo":true,
"hideCardIOLogo": true
},
onCardIOComplete,
onCardIOCancel
);

alert("Success");

CardIO.canScan(onCardIOCheck);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.