Skip to main content

Integration with Cybersource

The following steps should only be followed if you have requested activation of Cybersource's fraud detection functionality through Izipay. Otherwise, following these steps will only increase the size of the application without gaining any advantage.

Step 1: Library integration

To integrate the Cybersource libraries into your Android project, follow these technical steps:

  1. Add the 5 Cybersource libraries to the application project. This is accomplished by dragging the Cybersource .aar files, whose names begin with TMX, into the project's "libs" directory.
implementation files('../libs/TMXProfiling-rl-7.4-34.aar')
implementation files('../libs/TMXProfilingConnections-rl-7.4-34.aar')
implementation files('../libs/TMXDeviceSecurityHealth-rl-7.4-34.aar')
implementation files('../libs/TMXBehavioSec-rl-7.4-34.aar')
implementation files('../libs/TMXAuthentication-rl-7.4-34.aar')

It is important to note that this integration process is similar to the one used to add the Izipay SDK to the project. Both require dragging the corresponding files to the "libs" folder of the project so that they are available in the application and can be used during development and execution.

Step 2: Adding Cybersource file

Next, add the Cybersource.kt file to the ui folder that has the Cybersource configuration.

Step 3: Adding onCreate method

Note: The code is valid only for Kotlin.

Next, add the following lines of code in the onCreate method of your activity.

lifecycleScope.launch {
EventBus.subscribe<Cybersource> { cyber ->
initCyberSource (applicationContext, cyber.guid!!, cyber.url!!, cyber.userorg!!, cyberuserScoring!!)
}
}