💳 MvvmCross Plugin to scan credit cards using OCR
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CreditCardScan.Droid
CreditCardScan.iOS
CreditCardScan
Libs
nuspec
tools
.gitignore
CreditCardScan.sln
README.md
build.cake
build.sh

README.md

Mvx.CreditCardScan Build Status

💳 MvvmCross Credit Card Scan Plugin

This plugins wraps card.io to make it usable from any MvvmCross.

Installation

Install via NuGet using:

PM> Install-Package Mvx.CreditCardScan

Usage

Resolve it:

var creditCardScanService = Mvx.Resolve<ICreditCardScanService>();

Configure it, if needed (this step is optional):

var options = new CreditCardScanOptions
{
  GuideColor = "#1E1E1E",
  UsePaypalActionbarIcon = true
};

Call the scan screen asynchronously:

var creditCard = await creditCardScanService.ScanCardInfoAsync(options);

or using a callback:

creditCardScanService.ScanCardInfo(creditCard => { /* Magic goes here */ }, options);

The service never returns null, so you can compare the returned card with CreditCard.Empty to check if the call failed:

if (creditCard == CreditCard.Empty) return;

#Thanks

Credit Card Icon by Zlatko Najdenovski from the Noun Project