Reputation: 3
I am trying to implement 3ds2 Mastercard android sdk with kotlin and ReactNative. I am following documentation came along with SDK, still i am getting Failed to validate 'acsURL'. While doing some tinkering i have found acs url that i am receiving in response is not a complete URL. i am just getting the location.
Now, am i doing something wrong here?
I am creating a session and updating it through API call as document suggested.
Then initialising the SDK, and then authenticating 3ds\
In logs, i can see Signature verified!
but it is an error log for some reason.
SDK initialisation
lifecycleScope.launch {
try {
GatewaySDK.initialize(
applicationContext as Application,
merchantId,
merchantName,
merchantUrl,
region,
)
promise.resolve(null)
} catch (e: Exception) {
e.message?.let { Log.e(TAG, it) }
}
}
authentication
AuthenticationHandler.authenticate(
this,
session,
authTransactionId,
){ response ->
when (response.recommendation) {
AuthenticationRecommendation.PROCEED -> {
Log.d(TAG, "AUTHENTICATION RESPONSE: $response")
}
AuthenticationRecommendation.DO_NOT_PROCEED -> {
Log.d(TAG, "AUTHENTICATION RESPONSE DO NOT PROCEED: $response.error")
}
null -> {
Log.d(TAG, "AUTHENTICATION ERROR: $response")
}
}
}
Error Log
2024-09-10 01:12:56.883 12541-12541 MSJWE com.sdkdemo E Signature verified!
2024-09-10 01:03:10.054 12541-12541 TransactionImpl com.sdkdemo E AcsSignedContent#verifyAndBuild failed
java.lang.RuntimeException: Failed to validate 'acsURL'!
at com.usdk.android.a.a(Unknown Source:71)
at com.usdk.android.a.a(Unknown Source:97)
at com.usdk.android.TransactionImpl.a(Unknown Source:84)
at com.usdk.android.TransactionImpl.doChallenge(Unknown Source:17)
at com.mastercard.gateway.android.sdk.AuthenticationHandler$suspendDoChallenge$2.invokeSuspend(Authentication.kt:400)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Upvotes: 0
Views: 39