Adyen / adyen-android

Adyen Android Drop-in and Components
https://docs.adyen.com/checkout/android
MIT License
119 stars 66 forks source link

[v5.2.0] Request for clarification: No 3DS dialog shown when using session payments & drop-in #1536

Open JakeSteam opened 1 month ago

JakeSteam commented 1 month ago

Hey, not necessarily a bug report, more of an "is this a bug" report.

Context

I am migrating an app from 4.X with components and advanced flow, to 5.2.0 with drop-in and sessions. Payments all seem to work, however when attempting to make a payment using sessions, no 3DS verification dialog / redirect is shown for 3DS enabled cards.

This occurs for brand new accounts, and whilst I'm happy it's working... I'd like to check it's actually working correctly, perhaps by forcing a "worst case" 3DS scenario!

Confusion

This documentation seems to state some extra configuration is required, but it only applies to "Advanced flow".

This guide is for integrations using Drop-in v5.0.0 with the Advanced flow.

Similarly, this documentation seems to imply 3DS2 might occur without any user interaction at all, which is astonishing if true. Is there a way to force a challenge flow?

In a frictionless flow, the acquirer, issuer, and card scheme exchange all necessary information in the background through passive authentication using the shopper's device fingerprint. The transaction is completed without further shopper interaction.

I don't currently have access to the backend configuration, but essentially wanted to check not seeing any dialog yet everything just working is... all OK? Apologies for the vagueness!

Supporting evidence

Drop-in initialising:

@Composable
fun CheckoutDropIn(
    context: Context,
    sessionDropInCallback: SessionDropInCallback,
    checkoutSession: CheckoutSession
) {
    val dropInLauncher = rememberLauncherForDropInResult(sessionDropInCallback)
    SideEffect {
        DropIn.startPayment(
            context,
            dropInLauncher,
            checkoutSession,
            PaymentManager.checkoutConfiguration
        )
    }
}

Note: All parameters are created as per docs, e.g. CheckoutSessionProvider.createSession for the session.

Checkout configuration:

        private val cardConfiguration = CardConfiguration
            .Builder(Locale.getDefault(), env, key)
            .setHolderNameRequired(true)
            .build()

        val checkoutConfiguration = DropInConfiguration.Builder(Locale.getDefault(), env, key)
            .addCardConfiguration(cardConfiguration)
            .build()
araratthehero commented 1 month ago

Hi @JakeSteam, thank you for the detailed explanation of your question and for reviewing our documentation.

It's possible for 3DS2 to occur without any user interaction. However, I understand your concern that without adding support for 3DS, if user interaction is necessary, the payment could fail.

Here's what I suggest:

Could you please try this approach and let me know if it worked for you?

JakeSteam commented 1 month ago

@araratthehero Thanks for the quick reply, those look good!

It's a holiday here until next Tuesday, so will give those a try and get back to you next week 🙂