-
Notifications
You must be signed in to change notification settings - Fork 3
PhotoPay Dutch results
Nenad Mikša edited this page Oct 22, 2016
·
3 revisions
To initialize the scanning of Dutch slips, use the following intialization code:
- (PPCameraCoordinator*)createCoordinator {
// Check if photopay is supported
NSError *error;
if ([PPCameraCoordinator isScanningUnsupportedForCameraType:PPCameraTypeBack error:error]) {
NSString *messageString = [error localizedDescription];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Warning" message:messageString delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
return nil;
}
// 1. ******* Instantiate Scanning settings ********/
PPSettings* settings = [[PPSettings alloc] init];
// 2. ************* Setup UI Settings **************/
// Instantiate PhotoPay UI settings. This allows more customization in the initialization process.
PPPhotoPayUiSettings* photopayUiSettings = [[PPPhotoPayUiSettings alloc] init];
settings.uiSettings = photopayUiSettings;
// Use english language
photopayUiSettings.language = @"en";
// 3. ************* Setup Scan Settings **************/
// Add recognizer for Dutch payslips
[settings.scanSettings addRecognizerSettings:[[PPNedSlipRecognizerSettings alloc] init]];
// 4. ************* Setup License Settings **************/
// Set your license key here. This specific key is for demo purposes only!
settings.licenseSettings.licenseKey = @"DBRWHNRH-YLGPHFUJ-Q7TGEPYE-G22L7IFY-2V2E7NTP-DB5I5T2P-WZXRQ6UO-Z5H56WZN";
// Allocate the recognition coordinator object
PPCameraCoordinator *coordinator = [[PPCameraCoordinator alloc] initWithSettings:settings];
return coordinator;
}
- (IBAction)didTapScan:(id)sender {
PPCameraCoordinator* coordinator = [self createCoordinator];
if (coordinator == nil) {
return;
}
// Create camera view controller
UIViewController<PPScanningViewController> *cameraViewController = [PPViewControllerFactory cameraViewControllerWithDelegate:self overlayViewController:overlayVC coordinator:coordinator error:nil];
cameraViewController.autorotate = YES;
cameraViewController.supportedOrientations = UIInterfaceOrientationMaskLandscape;
// present it
cameraViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:cameraViewController animated:YES completion:nil];
}
Scanning results for Dutch payslips are obtained as instances of a class PPNedSlipRecognizerResult
. See the header files or sample below for all fields contained in these objects.
- (void)scanningViewController:(UIViewController<PPScanningViewController> *)scanningViewController
didOutputResults:(NSArray *)results {
// find the recognition result and process it
for (PPRecognizerResult* result in results) {
if ([result isKindOfClass:[PPNedSlipRecognizerResult class]]) {
[self processNedSlipRecognizerResult:(PPNedSlipRecognizerResult*)result];
}
};
}
- (void)processNedSlipRecognizerResult:(PPNedSlipRecognizerResult*)nedSlipResult {
// Here we log all field in PPNedSlipRecognizerResult object
NSLog(@"Dutch payment slip results\n");
NSLog(@"Amount is %@", [nedSlipResult amount]);
NSLog(@"Currency is %@", [nedSlipResult currency]);
NSLog(@"IBAN is %@", [nedSlipResult iban]);
NSLog(@"Account number is %@", [nedSlipResult accountNumber]);
NSLog(@"Reference number is %@", [nedSlipResult referenceNumber]);
}
- Getting Started with PhotoPay SDK
-
Obtaining scanning results
- Scanning Austrian payslips
- Scanning Belgian payslips
- Scanning Croatian HUB payslips / barcodes
- Scanning Dutch Acceptgiros
- Scanning German payslips
- Scanning Hungarian payslips
- Scanning SEPA payment QR codes
- Scanning Slovenian payslips
- Using BlinkID recognizers
- Using MRTD Recognizer for scanning ID documents
- Using EUDL Recognizer
- Using USDL Recognizer
- Using MyKad recognizer
- Using PDF417 Recognizer
- Using BarDecoder Recognizer
- Using ZXing Recognizer
- Using Barcode Recognizer
- Using Templating API
- Using Detector Recognizer
- Using BlinkInput OCR Recognizer
- Troubleshoot
- Using Direct Processing API
- Customizing Camera UI
- Creating customized framework
- Upgrading from older versions