Skip to content

faceterteam/PayCards_iOS

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
July 29, 2017 10:28
October 1, 2019 13:53
October 1, 2019 14:19
July 21, 2017 18:59
February 12, 2020 12:12
December 9, 2019 22:27
October 1, 2019 14:19
October 1, 2019 14:19
November 8, 2017 16:06

PAY.CARDS RECOGNIZER

Source Code: iOS, C++

iOS SDK

Sample app

See PayCardsRecognizerExample project

Installation

If you use CocoaPods:
pod 'PayCardsRecognizer'
If you don't use CocoaPods:
  1. Download the latest version of the SDK (PayCardsRecognizer.framework).
  2. Add the PayCardsRecognizer.framework to your Xcode project.
  3. Add the PayCardsRecognizer.framework to Embedded Binaries.

Usage

import PayCardsRecognizer

class RecognizerViewController: UIViewController, PayCardsRecognizerPlatformDelegate {

	var recognizer: PayCardsRecognizer!
	
	override func viewDidLoad() {
	    super.viewDidLoad()
	    recognizer = PayCardsRecognizer(delegate: self, resultMode: .sync, container: self.view, frameColor: .green)
	}
	
	override func viewWillAppear(_ animated: Bool) {
	    super.viewWillAppear(animated)
	    
	    recognizer.startCamera()
	}
	    
	override func viewDidDisappear(_ animated: Bool) {
	    super.viewDidDisappear(animated)
	    
	    recognizer.stopCamera()
	}
	
	// PayCardsRecognizerPlatformDelegate
	
	func payCardsRecognizer(_ payCardsRecognizer: PayCardsRecognizer, didRecognize result: PayCardsRecognizerResult) {
		result.recognizedNumber // Card number
		result.recognizedHolderName // Card holder
		result.recognizedExpireDateMonth // Expire month
		result.recognizedExpireDateYear // Expire year
	}

}