Adyen / adyen-react-native

Adyen React Native
https://docs.adyen.com/checkout
MIT License
44 stars 32 forks source link

onAdditionalDetails not called on some successful 3DS payments #249

Closed EvertV closed 6 months ago

EvertV commented 1 year ago

Describe the bug Some new users have a successful payment (0.02€ for us), but without payment method in our DB. This is because the function onAdditionalDetails is (sometimes) not being called by the adyen-react-native package. I can confirm this because of tracking that we added on these functions.

Scope Not all users adding bcmc_mobile_app as a payment method have this issue. But it still happens regularly.

To reproduce Steps to reproduce the behavior:

  1. Try a Bancontact (or I assume any other 3DS) payment with a bunch of different devices and (Belgian?) banking apps until you find a device where it doesn't call onAdditionalDetails
  2. Redirected to banking app (perform 3DS) & pay the required amount (0.02 EUR for us)
  3. Get redirected back to the app
  4. onAdditionalDetails (and onComplete / onError) is not called

Examples PSP references can be found in Adyen Support Ticket #4016934. There's 1 specific case I'd like to mention here;

Client using the BNP Paribas Fortis app (same app as me, and I never had this issue):

The first 2 attempts have the payment method "Bancontact", but the last one has "Bancontact app". For me, also using BNP Paribas Fortis app, I always have Payment method "Bancontact app". The user confirmed to me that they didn't do anything different after reinstalling the app, they selected the same payment method, it opened the same banking app and suddenly it worked.

Possible workaround I will start looking into the details that we get from the webhook. I think we can take the recurringDetailReference from the RECURRING_CONTRACT event and use cardSummary from the AUTHORISATION event for the paymentMethodDigits. If this works we have a workaround for people that experience this issue. However it results in a less optimal onboarding flow, since onComplete or onError don't get called by the adyen-react-native package when this issue occurs.

Expected behavior onAdditionalDetails always gets called after 3DS payments

descorp commented 6 months ago

Hey @EvertV

Were you able to figure this out?

EvertV commented 6 months ago

Hi @descorp , yeah the back-end workaround did the trick

I will start looking into the details that we get from the webhook. I think we can take the recurringDetailReference from the RECURRING_CONTRACT event and use cardSummary from the AUTHORISATION event for the paymentMethodDigits. If this works we have a workaround for people that experience this issue. However it results in a less optimal onboarding flow, since onComplete or onError don't get called by the adyen-react-native package when this issue occurs.