This guide describes how to use 3DS SDK in combination with the Mobile SDK (MSDK) and Ready-to-use UI. We assume that you already went through the base MSDK integration guide and can submit payments. If yes, proceed with the following instructions to enhance payments with the 3D Secure 2 verification.
NOTE: First of all, proper configuration in the Administration Portal should be done to enable 3DS 2 for the specific card brands.
iOSAndroid
Requirements
MSDK 2.62.0 or higher
Xcode 11 and iOS 13 SDK
iOS 10.0+ deployment target
Android 4.4 (API Level 19) or higher
Import libraries
Import the following frameworks to the project:
ipworks3ds_sdk.xcframework // certified 3DS SDK
OPPWAMobile_ThreeDS.xcframework // wrapper SDK to simplify the integration
Drap and drop ipworks3ds_sdk.xcframework & OPPWAMobile_ThreeDS.xcframework to the "Frameworks" folder of your project. Make sure "Copy items if needed" is checked.
Embed the frameworks
Go to the app target’s General configuration page.
Add the frameworks target to the Frameworks, Libraries, and Embedded Content section by clicking the Add icon.
Review your Build Phases:
ipworks3ds_sdk.xcframework & OPPWAMobile_ThreeDS.xcframework are added to the "Link Binary With Libraries".
Import the following two libraries in your project in addition to the base Mobile SDK (File > New > New Module > Import .JAR/.AAR Package).
Then, reference them from your application (File > Project Structure > Dependencies > Add Module Dependency).
ipworks3ds_sdk.aar // certified 3DS SDK
oppwa.mobile.threeds.aar // wrapper SDK to simplify the integration
Also add one extra dependency to the build.gradle if it's not here yet:
Add the following rules into your project's proguard file:
-keep class com.oppwa.mobile.connect.threeds.OppThreeDSService { *; }
-keep class com.nsoftware.ipworks3ds.sdk.ThreeDS2Service { *; }
You can stop here, there are no more mandatory steps for this kind of integration. But we strongly recommend to look through the Customization guide to check advanced features of the 3DS SDK. Use the config property of the OPPOppThreeDSService instance to apply customizations, note that it's still not mandatory to call initialization by yourself, everything else is implemented by MSDK.
[Optional] Initialize the 3DS service in advance
By default, initialization is started by MSDK while checkout is loading, but you may want to do it earlier, even on application start. Initialization phase includes fetching actual config info from the Server, collecting device data and performing security checks. All these actions are done in background thread, so start it whenever you want, it won't affect UI thread.