- Created by Siddhartha Chikatamalla, last modified on Jan 23, 2020
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 10 Next »
General FAQs
Yes, CardinalMobileSDK supports both JAVA as well as Kotlin. Code snippet of each programming languages can be found in the documentation.
Yes, CardinalMobileSDK uses Nimbus JOSE+JWT for encryption/ decryption. These need to add in your Gradel dependencies.
The downloaded framework file size is 1.4 MB. Once integrated with the app, it adds 700KB to the total size.
You can also download .aar file directly from Jfrog by navigating into the package and clicking cardinalmobilesdk-*.*.*-*.aar file under Direct Downloads section as shown below.
Change the import statements as follows :
import com.cardinalcommerce.cardinalmobilesdk.models.response.CardinalActionCodeimport com.cardinalcommerce.cardinalmobilesdk.models.response.ValidateResponse
import com.cardinalcommerce.shared.models.parameters.CardinalConfigurationParametersimport com.cardinalcommerce.shared.models.parameters.CardinalEnvironmentimport com.cardinalcommerce.shared.models.parameters.CardinalRenderTypeimport 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
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 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)
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'
Following rules added to ProGuard in the 2.2.2 release of the SDK
-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 *; } -ignorewarnings
Config FAQs
No, if you are using staging credential make sure SDK config is set to Staging Environment and switch back to Production Environment when moving to production. SDK is configured to Production Environment by default.
Yes, you can customize the certain aspect of Challenge Screen by setting the UICustomization in SDK Config. See UI Customization v2.2.2 for details.
You should verify the following:
- Copy your .ttf file to “font” folder under “assets” in the main directory
- 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
- If you don’t already have an assets file, right click on the main directory | New | Android Resource Directory
- Once you have verified you have your font in the right place, Pass in fontName as “font/font_name.ttf”
- eg. buttonCustomization.setTextFontName(“font/walkwayblack.ttf”);
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
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.
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.
OnValidated handler of the Setup will be called with the corresponding error message.
ProcessBin FAQs
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
If the parameter you passed to the continue, like TransactionId or Payload is invalid then, continue will throw an error.
Make sure the ThreeDSVersoin of the lookup response matches with what SDK Supports. SDK does not support 1.0 Payload.
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.
No. It means the authentication failed based on the data user provided.
- No labels