3DS SDK + MSDK + Ready-to-use UI
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.
Todo Java Script
iOS
Requirements
- MSDK 2.62.0 or higher
- Xcode 11 and iOS 13 SDK
- iOS 10.0+ deployment target
Import libraries
Import the following frameworks to the project:
ipworks3ds_sdk.xcframework // certified 3DS SDK
OPPWAMobile_ThreeDS.xcframework // wrapper SDK to simplify the integration
ipworks3ds_sdk.xcframework
included: one to be used for development and one for production. The production version includes more strict security measures that would not allow for common development processes to occur, including running with attached debuggers or using simulators/emulators. The deployment version includes _deploy
in the filename. - 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 OPPWAMobile_ThreeDS;
@import ipworks3ds_sdk;
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 OPP
ThreeDSService
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.
NSArray<NSString *> *paymentBrands = @[@"AMEX", @"VISA"];
[[OPPThreeDSService sharedInstance] initializeWithTransactionMode:OPPThreeDSTransactionModeLive
paymentBrands:paymentBrands];
let paymentBrands = ["AMEX", "VISA"]
OPPThreeDSService.sharedInstance.initialize(transactionMode: .live, paymentBrands: paymentBrands)
Android
Requirements
- MSDK 2.62.0 or higher
- Android 4.4 (API Level 19) or higher
Import libraries
Import the following two libraries in your project in addition to the base Mobile SDK (File > New > New Module > Import .JAR/.AAR Package)..
ipworks3ds_sdk.aar // certified 3DS SDK
oppwa.mobile.threeds.aar // wrapper SDK to simplify the integration
ipworks3ds_sdk.aar
included: one to be used for development and one for production. The production version includes more strict security measures that would not allow for common development processes to occur, including running with attached debuggers or using simulators/emulators. The deployment version includes _deploy
in the filename. Add the module and required dependencies to the build.gradle
:
// this name must match the library name defined with an include: in your settings.gradle file
implementation project(":ipworks3ds_sdk")
implementation project(":oppwa.mobile.threeds")
implementation "androidx.constraintlayout:constraintlayout:x.x.x"
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 Opp
ThreeDSService
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.
List<String> paymentBrands = Arrays.asList("AMEX", "VISA");
OppThreeDSService.getInstance().initialize(
getApplicationContext(),
TransactionMode.LIVE,
paymentBrands);
val paymentBrands = listOf("AMEX", "VISA")
OppThreeDSService.getInstance().initialize(
applicationContext,
TransactionMode.LIVE,
paymentBrands)