Netswipe Mobile Implementation Guide for ios This guide is a reference manual and configuration guide for the Netswipe Mobile product. It illustrates how to embed the SDK into your app. Copyright: Jumio Inc. 268 Lambert Avenue, Palo Alto, CA 94306
Contents Netswipe Mobile Implementation Guide for ios... 1 Contents... 2 Release notes... 3 Contact... 3 Overview... 4 Setup... 4 Integration... 4 Initializing the SDK... 5 Displaying the SDK... 5 Configuring the SDK... 6 Retrieving information... 6 Customization... 7 Customizing look and feel... 7 Adding vibration and sound effect... 7 Localizing labels... 7 Scanning... 8 iphone and ipod Touch... 8 ipad... 9 Confirmation... 9 2
Release notes Visit Netswipe Mobile Release Notes to see released additions, changes and fixes for every version. Contact If you have any questions regarding the Netswipe Mobile implementation please contact support@jumio.com. 3
Overview Use Netswipe Mobile in your application by including a library with header files. Trigger the scanning process by displaying the SDK view. The SDK finds and scans the card, the user enters the CVV code (optional), or the user chooses to enter credit card details manually (optional). Once the process is completed, the SDK view will disappear and you will receive a callback with the scan result, including the card number, expiry date, CVV code (optional), card type, and the Jumio scan reference. Setup The minimum requirements for the SDK are: iphone 3GS and higher, ipad 2 and higher, ipod Touch 4G and higher ios 5.0 and higher Internet connection, communication via standard SSL port 443 These frameworks need to be added to the Xcode project: AudioToolbox CoreVideo AVFoundation Foundation CFNetwork OpenGLES CoreGraphics QuartzCore CoreLocation UIKit CoreMedia Security Add the following flags to your Xcode Build Settings in section "Other Linker Flags": "-lstdc++" "-ObjC" Valid architectures must to be set to "armv7 armv7s". The supported platforms are iphonesimulator and iphoneos (device). Integration Check the Xcode sample project available for download to learn the most common use of the Netswipe Mobile SDK. Please note, the SDK processes images in real-time and allocates about 18 MB heap memory. Applications implementing the SDK should apply ios secure coding guidelines and shall not run on jailbreaked devices 1. Developers shall use a self-devised check to prevent usage of SDK scanning functionality on jailbreaked devices. 1 In case of doubt please consult a PCI QSA (Qualified Security Assessor). 4
Initializing the SDK To create an instance of the Netswipe Mobile SDK, perform the following call. NetswipeViewController *netswipeviewcontroller = [[NetswipeViewController alloc] initwithmerchantapitoken: @"<merchant-api-token>" apisecret: @"<merchant-api-secret>" delegate: <yourdelegate-object>]; Make sure that your merchant API token and API secret are correct and specify a delegate object that implements the NetswipeViewControllerDelegate protocol. Note: Log into https://netswipe.com, and you can find your merchant API token at the bottom of each page The API secret is displayed on the "Settings" page under "Change Credentials". Displaying the SDK iphone and ipod Touch To show the SDK, present the Netswipe view controller with the method below. [myviewcontroller presentviewcontroller: netswipeviewcontroller animated: YES completion: nil]; The SDK view automatically switches between portrait and landscape mode. ipad Create a UIPopoverController and initiate it with the Netswipe view controller. UIPopoverController *popovercontroller = [[UIPopoverController alloc] initwithcontentviewcontroller: netswipeviewcontroller]; Present the popover with the method below to show the SDK. [myviewcontroller presentpopoverfromrect: scanbutton.frame inview: myviewcontroller.view permittedarrowdirections: UIPopoverArrowDirectionAny animated: YES]; The SDK view automatically uses the orientation configuration of the app. To configure interface orientations implement the following delegate method. // Example: Interface orientation is portrait - (BOOL) netswipeviewcontrollershouldsupportinterfaceorientation: (UIInterfaceOrientation) orientation { return UIInterfaceOrientationIsPortrait(orientation); } 5
Configuring the SDK You may want to configure individual card types you support in your app, displayed in the bottom bar of the SDK view. Therefore, set the property cardtypes by combining the constants using the C bitwise OR operator. Only supported card types will be returned to your app. NetswipeCreditCardTypes cardtypes = NetswipeCreditCardTypeVisa NetswipeCreditCardTypeMasterCard; [netswipeviewcontroller setsupportedcardtypes: cardtypes]; You can enable or disable manual credit card entry with setallowmanualcarddetailinput ("Manual entry" function), and CVV entry with setallowmanualcardinformationinput. [netswipeviewcontroller setallowmanualcarddetailinput: YES]; [netswipeviewcontroller setallowmanualcardinformationinput: YES]; To limit the attempts per user, change the property maximumscanattempts (0 = unlimited). [netswipeviewcontroller setmaximumscanattempts: 2]; Retrieving information Implement the following delegate methods for scan attempts, successful scans and user cancellation notifications. The parameter cardinformation contains the scanned card details and the scanreference allows you to identify the scan in your reports. Dismiss the SDK view in your app once you received the callback. Note: After processing the card information, make sure to delete the data within the app. - (void) netswipeviewcontroller:(netswipeviewcontroller*) controller didstartscanattemptwithjumioscanreference: (NSString*) scanreference { NSLog(@"NetswipeViewController did start scan attempt with scan reference: %@", scanreference); } - (void) netswipeviewcontroller:(netswipeviewcontroller*) controller didfinishscanwithcardinformation:(netswipecardinformation*) cardinformation jumioscanreference: (NSString*) scanreference manuallyenteredcardnumber: (BOOL) manualentry { NSLog(@"Scan successful"); } - (void) netswipeviewcontroller: (NetswipeViewController*) controller didcancelwitherror: (NSError*) error { NSLog(@"User cancelled"); } 6
Customization Customizing look and feel The SDK can be customized to fit your application's look and feel. The navigation bar at the top is fully customizable. You can specify a background image and a tint color (especially important for the buttons). [netswipeviewcontroller setnavigationbarbackgroundimage: [UIImage imagenamed: @"TopBar_bg.png"]]; [netswipeviewcontroller setnavigationbartintcolor: [UIColor graycolor]]; Note: ipad look and feel customization options will follow. Adding vibration and sound effect You can set a short vibration (only on iphone) and sound effect to feed back to the user that the card has been detected. [netswipeviewcontroller setvibrationeffect: YES]; [netswipeviewcontroller setsoundeffectfile: @"your-sound-effect-file.aif"]; Localizing labels All label texts and button titles can be changed and localized using the Localizable- Netswipe.strings file. Just adapt the values to your required language and add this file in your Xcode project. Below are some examples how to localize values. "netswipe-mobile-sdk.button.rescan.title" = "Scan again"; "netswipe-mobile-sdk.button.manual-entry.title" = "Manual entry"; 7
Scanning The user should align the card with the white frame displayed on the phone s screen. It will automatically detect the edges of the card and fill the frame. The scanning procedure starts when the card is fully detected. With the button on the top left the user can turn the flash light on or off. The flash light is useful for better exposure in dark environments. If scanning failed then two options are provided to the user: Rescan Manual entry enter credit card details manually (optional) iphone and ipod Touch 8
ipad Confirmation The user enters the CVV code and confirms the scanning procedure (optional). If the scanning procedure takes a little longer the card might be difficult to process. In that case a progress indicator appears estimating the time of completion. If the card could not be scanned at all, the user is provided with two options: Rescan Manual entry enter credit card details manually (optional) 9