Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

General FAQs

Expand
limit2
titleDoes the SDK support JAVA/Kotlin?

Yes, CardinalMobileSDK supports both JAVA as well as Kotlin. Code snippets of each programming language can be found in the documentation.


Expand
limit2
titleDoes the SDK have any third party SDK/Library dependencies?

Yes, CardinalMobileSDK uses Nimbus JOSE+JWT for encryption/ decryption. These need to add in your Gradel dependencies.


Expand
limit2
titleWhat is the size of the 2.2.3-2 SDK Version ?

The downloaded framework file size is 1.6 MB. Once integrated with the app, it adds 795KB to the total size.


Expand
titleCan I download the SDK into my project manually ?

You can also download the .aar file directly from Jfrog by navigating into the package and clicking cardinalmobilesdk-*.*.*-*.aar file under the Direct Downloads section as shown below.


Expand
limit2
titleErrors on updating the SDK to 2.1.4

Change the import statements as follows :

import com.cardinalcommerce.cardinalmobilesdk.models.response.CardinalActionCode
import com.cardinalcommerce.cardinalmobilesdk.models.response.ValidateResponse

import com.cardinalcommerce.shared.models.parameters.CardinalConfigurationParameters
import com.cardinalcommerce.shared.models.parameters.CardinalEnvironment
import com.cardinalcommerce.shared.models.parameters.CardinalRenderType
import com.cardinalcommerce.shared.models.parameters.CardinalUiType

to 

mport com.cardinalcommerce.cardinalmobilesdk.enums.CardinalEnvironment
import com.cardinalcommerce.cardinalmobilesdk.enums.CardinalRenderType
import com.cardinalcommerce.cardinalmobilesdk.enums.CardinalUiType
import com.cardinalcommerce.cardinalmobilesdk.models.CardinalActionCode
import com.cardinalcommerce.cardinalmobilesdk.models.CardinalConfigurationParameters
import com.cardinalcommerce.cardinalmobilesdk.models.ValidateResponse


Expand
titleWhat are the rules added in ProGuard to support BouncyCastle and Nimbus?

Following rules added to ProGuard in the 2.2.3 release of the SDK

Code Block
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.asn1.pkcs.PrivateKeyInfo
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.asn1.x509.SubjectPublicKeyInfo
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.asn1.ASN1ObjectIdentifier

-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.asymmetric.**

-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.openssl.PEMParser
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.symmetric
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.asymmetric
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.digest
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.keystore
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.drbg
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.symmetric.util.ClassUtil
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.util.AlgorithmProvider
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter

-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.asn1.PQCObjectIdentifiers
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.jcajce.provider.mceliece.McElieceCCA2KeyFactorySpi
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.jcajce.provider.mceliece.McElieceKeyFactorySpi
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.jcajce.provider.newhope.NHKeyFactorySpi
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.jcajce.provider.qtesla.QTESLAKeyFactorySpi
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.jcajce.provider.rainbow.RainbowKeyFactorySpi
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.jcajce.provider.sphincs.Sphincs256KeyFactorySpi
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.jcajce.provider.xmss.XMSSKeyFactorySpi
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.pqc.jcajce.provider.xmss.XMSSMTKeyFactorySpi


-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.util.io.pem.PemObject
-keep class com.cardinalcommerce.dependencies.internal.bouncycastle.util.io.pem.PemReader

-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.JOSEException
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.EncryptionMethod
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.JWEAlgorithm
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.JWECryptoParts
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.JWEHeader
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.JWSAlgorithm
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.JWSObject
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.JWSVerifier
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.KeyLengthException
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.Payload
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.JWEObject
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.RSAEncrypter

-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.ECDSAVerifier
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.RSASSAVerifier
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.impl.ConcatKDF
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.impl.ECDH
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.impl.AAD
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.impl.AESCBC
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.impl.AESGCM
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.impl.AlgorithmSupportMessage
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.impl.AuthenticatedCipherText
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.impl.DeflateHelper
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.DirectEncrypter
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.crypto.DirectDecrypter

-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.util.Base64URL
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.util.Base64
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.util.X509CertUtils
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.util.ByteUtils
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.util.Container

-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.jwk.Curve
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.jwk.ECKey
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.jwk.JWK
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jose.jwk.PEMEncodedKeyParser

-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jwt.EncryptedJWT
-keep class com.cardinalcommerce.dependencies.internal.nimbusds.jwt.JWTClaimsSet
-keep class com.cardinalcommerce.dependencies.internal.minidev.asm.FieldFilter

-ignorewarnings
-keep class com.cardinalcommerce.dependencies.internal.minidev.json.* {
    public private *;
}


Expand
titleFollowing rules added to ProGuard in the 2.2.2 release of the SDK


Code Block
-keep class org.bouncycastle.asn1.pkcs.PrivateKeyInfo
-keep class org.bouncycastle.asn1.x509.SubjectPublicKeyInfo
-keep class org.bouncycastle.asn1.ASN1ObjectIdentifier

-keep class org.bouncycastle.jcajce.provider.asymmetric.**

-keep class org.bouncycastle.openssl.PEMParser
-keep class org.bouncycastle.jcajce.provider.symmetric
-keep class org.bouncycastle.jcajce.provider.asymmetric
-keep class org.bouncycastle.jcajce.provider.digest
-keep class org.bouncycastle.jcajce.provider.keystore
-keep class org.bouncycastle.jcajce.provider.drbg
-keep class org.bouncycastle.jcajce.provider.symmetric.util.ClassUtil
-keep class org.bouncycastle.jcajce.provider.util.AlgorithmProvider
-keep class org.bouncycastle.jcajce.provider.util.AsymmetricKeyInfoConverter

-keep class org.bouncycastle.pqc.asn1.PQCObjectIdentifiers
-keep class org.bouncycastle.pqc.jcajce.provider.mceliece.McElieceCCA2KeyFactorySpi
-keep class org.bouncycastle.pqc.jcajce.provider.mceliece.McElieceKeyFactorySpi
-keep class org.bouncycastle.pqc.jcajce.provider.newhope.NHKeyFactorySpi
-keep class org.bouncycastle.pqc.jcajce.provider.qtesla.QTESLAKeyFactorySpi
-keep class org.bouncycastle.pqc.jcajce.provider.rainbow.RainbowKeyFactorySpi
-keep class org.bouncycastle.pqc.jcajce.provider.sphincs.Sphincs256KeyFactorySpi
-keep class org.bouncycastle.pqc.jcajce.provider.xmss.XMSSKeyFactorySpi
-keep class org.bouncycastle.pqc.jcajce.provider.xmss.XMSSMTKeyFactorySpi


-keep class org.bouncycastle.util.io.pem.PemObject
-keep class org.bouncycastle.util.io.pem.PemReader

-keep class com.nimbusds.jose.JOSEException
-keep class com.nimbusds.jose.EncryptionMethod
-keep class com.nimbusds.jose.JWEAlgorithm
-keep class com.nimbusds.jose.JWECryptoParts
-keep class com.nimbusds.jose.JWEHeader
-keep class com.nimbusds.jose.JWSAlgorithm
-keep class com.nimbusds.jose.JWSObject
-keep class com.nimbusds.jose.JWSVerifier
-keep class com.nimbusds.jose.KeyLengthException
-keep class com.nimbusds.jose.Payload
-keep class com.nimbusds.jose.JWEObject
-keep class com.nimbusds.jose.crypto.RSAEncrypter

-keep class com.nimbusds.jose.crypto.ECDSAVerifier
-keep class com.nimbusds.jose.crypto.RSASSAVerifier
-keep class com.nimbusds.jose.crypto.impl.ConcatKDF
-keep class com.nimbusds.jose.crypto.impl.ECDH
-keep class com.nimbusds.jose.crypto.impl.AAD
-keep class com.nimbusds.jose.crypto.impl.AESCBC
-keep class com.nimbusds.jose.crypto.impl.AESGCM
-keep class com.nimbusds.jose.crypto.impl.AlgorithmSupportMessage
-keep class com.nimbusds.jose.crypto.impl.AuthenticatedCipherText
-keep class com.nimbusds.jose.crypto.impl.DeflateHelper
-keep class com.nimbusds.jose.crypto.DirectEncrypter
-keep class com.nimbusds.jose.crypto.DirectDecrypter

-keep class com.nimbusds.jose.util.Base64URL
-keep class com.nimbusds.jose.util.Base64
-keep class com.nimbusds.jose.util.X509CertUtils
-keep class com.nimbusds.jose.util.ByteUtils
-keep class com.nimbusds.jose.util.Container

-keep class com.nimbusds.jose.jwk.Curve
-keep class com.nimbusds.jose.jwk.ECKey
-keep class com.nimbusds.jose.jwk.JWK
-keep class com.nimbusds.jose.jwk.PEMEncodedKeyParser

-keep class com.nimbusds.jwt.EncryptedJWT
-keep class com.nimbusds.jwt.JWTClaimsSet
-keep class net.minidev.asm.FieldFilter
-keep class net.minidev.json.* { 
    public private *;
}




Expand
limit2
titleWhy is the SDK size increased?

With the latest version of SDK, we removed integration on third party dependency through gradle imports, and this will increase SDK size but will decrease your entire app size when compared to older versions.


Expand
limit2
titleWhy I'm seeing unresolved references to classes or interfaces warnings

We've added a few third-party libraries to the SDK along with few pro-guard rules, you can resolve those warnings by adding -ignorewarnings to proguard.pro file.


Expand
limit2
titleWhat all third-party libraries baked in the SDK?

The following jar files to our SDK.

• bcprov-jdk15on-1.62.jar

• jcip-annotations-1.0.jar

• json-smart-2.3.jar

• nimbus-jose-jwt-7.0.1.jar


Expand
limit2
titleError ' Dependency failing: com.nimbusds:nimbus-jose-jwt:5.1 -> net.minidev:json-smart@[1.3.1,2.3] '

Root Cause:

Google started using nimbus library dependencies in its play services with version 4.3.0 ('com.google.gms:google-services:4.3.0') this is causing conflicts with anyone using nimbus library dependencies, google is using net.minidev:json-smart:1.3.1 where the latest version of nimbus library uses 2.3 this is causing conflict when merchants integrating CardinalMobile SDK with required dependencies ( 'com.nimbusds', name: 'nimbus-jose-jwt', version: '7.0.1', 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.61'). There are couple of ways to resolve this issue which are mentioned below.

Solution 1 : 

When you face conflicts in using dependencies version you can configure the Android Studio project to use a specific version.

Add below code to use 2.3 version of json-smart (if you want to use 1.3.1 replace prefer value to 1.3.1)

Code Block
languagejava
components.all {
        allVariants {
            withDependencies { deps ->
                deps.each { dep ->
                    if (dep.group == 'net.minidev' && dep.name =='json-smart') {
                        dep.version {
                            prefer "2.3"
                        }
                        dep.because "resolving dependencies issue"
                    }
                }
            }
        }
    }


Solution 2:

The other solution is using an old version of google play service which doesn't use nimbus library which is 'com.google.gms:google-services:4.1.0'


Expand
limit2
titleWhy I am seeing duplicate dependency for nimbus-jose-jwt and bcprov-jdk15on?

You will see these duplicate dependency errors if you are using Gradle import statements for nimbus and bouncy-castle, with the latest version of SDK we removed integration on third party dependency through Gradle imports and included these dependencies in SDK. Add the following script in gradle.build to exclude duplicate imports.

Code Block
languagejava
android {
  ...
    configurations {
        implementation.exclude module: 'nimbus-jose-jwt'
        implementation.exclude module: 'bcprov-jdk15on'
    }   
}
 
//With specific group name
android {
  ...
    configurations {
        implementation.exclude group: 'com.nimbusds', module: 'nimbus-jose-jwt'
        implementation.exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on'
    }
}




Config FAQs

Expand
limit2
titleCan I test staging credentials in production environment of SDK?

No, if you are using staging credentials make sure SDK config is set to Staging Environment and switch back to Production Environment when moving to production. SDK is configured to the Production Environment by default.


Expand
limit2
titleCan I customize the Challenge Screens?

Yes, you can customize the certain aspect of the Challenge Screen by setting the UICustomization in SDK Config. See  UI Customization v2.2.3 for details.


Expand
limit2
titleHow do I set custom font for UICustomization?

You should verify the following:

  1. Copy your .ttf file to “font” folder under “assets” in the main directory
    1. If you don’t already have an assets file, right-click on the main directory | New | Android Resource Directory
      - Directory name: assets
      - Directory Type: assets
      - Source Set: main
      - Once the directory is created, right-click | New | Android Resource Directory |
      - Directory name: font
      - Directory Type: font
      - Source Set: main
  2.  Once you have verified you have your font in the right place, Pass in fontName as “font/font_name.ttf”
    1. eg. buttonCustomization.setTextFontName(“font/walkwayblack.ttf”);


Expand
limit2
titleCan I get Setup Completion Handler called unsafe-only after Data Collection is complete?

Yes, you can set enableDFSync to true in SDK Config to get Setup Completion Handler called after Data Collection is complete. enableDFSync is set to false by default.


Setup/Init FAQs

Expand
limit2
titleWhy do I get Invalid JWT Error?

JWT might be invalid if the credentials in the JWT like OrgUnitID, APIKey, APIIdentifiers are invalid or the JWT has expired. Also, make sure the credentials in the JWT point to the correct environment that SDK is set to in the config.


Expand
limit2
titleWill I notified if Device Data Collection fails?

By default, no. If you want Setup to be successful only after Device Data collection is complete, then enable DF Sync in the SDK Config.


Expand
limit2
titleWhat if the device doesn't have internet access during Setup call?

OnValidated handler of the Setup will be called with the corresponding error message. 


ProcessBin FAQs

Expand
limit2
titleWhen does the ProcessBin unsafe-onComplete Handler doesn't get called?

If you start ProcessBin without successful completion of Setup/Init, then ProcessBin cannot be completed. Please check the console log for error details.


Continue FAQs

Expand
limit2
titleWhen can continue throw an error even without showing a challenge screen?

If the parameter you passed to the continue, like TransactionId or Payload is invalid then, continue will throw an error.


Expand
limit2
titleWhat should be passed as directoryServerID on continue?
You can use DirectoryServerID.VISA01 in V 2.1.3-X, this method is deprecated in the 2.1.4-X version of the SDK 


Expand
limit2
titleWhy is my Payload from Lookup response Invalid?

Make sure the ThreeDSVersoin of the lookup response matches with what SDK Supports. SDK does not support 1.0 Payload.


Expand
limit2
titleHow can I test different UI in Challenge Screen?

After all initial setup, in continue pass a sample payload of various UI Types to test different UI in Challenge Screens. You can get the sample payload for various UI type from your Client Manager or Implementation Manager.


Expand
limit2
titleDoes Failure ActionCode mean there was an error?

No. It means the authentication failed based on the data user provided.


...