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
Import the following frameworks to the project:
ipworks3ds_sdk.xcframework // certified 3DS SDK
OPPWAMobile_ThreeDS.xcframework // wrapper SDK to simplify the integration
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 OPPThreeDSService instance to apply customizations, note that it’s still not mandatory to call initialization by yourself, everything else is implemented by MSDK.
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
let paymentBrands = ["AMEX", "VISA"]
OPPThreeDSService.sharedInstance.initialize(transactionMode: .live, paymentBrands: paymentBrands)
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
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
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 OppThreeDSService instance to apply customizations, note that it’s still not mandatory to call initialization by yourself, everything else is implemented by MSDK.
List<String> paymentBrands = Arrays.asList("AMEX", "VISA");
val paymentBrands = listOf("AMEX", "VISA")