Adyen / adyen-3ds2-android

Apache License 2.0
28 stars 8 forks source link

Show 3DS challenge fails: Missing challengeInfoHeader #38

Closed mohadian closed 3 years ago

mohadian commented 3 years ago

Hi, I am getting an error trying to show challenge:

"Invalid JSON for NativeChallenge. No value for challengeInfoHeader"

To Reproduce Using Adyen DropIn 3.8.1, when I try to make a payment using Pleo credit card (MC), the DropIn tries to open the 3DS challenge page, it fails with the above error.

In fact, I can see two calls to https://3ds-b.live.ext.prod.enfuce.com/acs/app/challenge?id... the first one Request: eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2Iiwia.... Response: eyJraWQiOiIwN2FkNzRhMS03NGNkLTQ1ZmEtODE3YS00MjJkYjYx....

The second one Request:

{
    "messageType": "Erro",
    "messageVersion": "2.1.0",
    "threeDSServerTransID": "f20d0267-1dbd-494c-b927-56393949c79f",
    "acsTransID": "07ad74a1-74cd-45fa-817a-422db6117be6",
    "sdkTransID": "9be0e34b-e6ac-4555-a502-9e32126046e2",
    "sdkCounterStoA": "001",
    "errorCode": "201",
    "errorComponent": "C",
    "errorDescription": "Required Data Element Missing.",
    "errorMessageType": "CRes",
    "errorDetail": "Invalid JSON for NativeChallenge. No value for challengeInfoHeader"
}

The same implementation works when I try a Monzo card or Visa card.

It also fails on iOS with a different error (on iOS we are using Adyen '3.6.0')

{"messageType":"Erro","messageVersion":"2.2.0","threeDSServerTransID":"95245718-1cdd-42d6-a6db-b4154414350b","acsTransID":"19a21f11-2fb6-4a7e-b90b-6ebf60fac0c3","dsTransID":"6496a7d5-e635-44b9-8cbe-679d36026ad1","sdkTransID":"97ec2107-8fd6-47a9-b624-c875734a758e","errorCode":"203","errorDescription":"Invalid format","errorDetail":"Field [messageVersion] has a wrong value [2.2.0]","errorMessageType":"CReq","errorComponent":"A"}

Expected behaviour The SDK should display the 3DS challenge page.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context As I mentioned, when I try a different card (Monzo) it works fine I can see https://checkoutshopper-live.adyen.com in the calls but when it fails I only see https://checkoutshopper-test.adyen.com

The ones which are successful, don't have the threeDS2Challenge returned, however, the card provider asks for approval and the drop-in opens the challenge page

        action": {
        "paymentData": "Ab02b4....",
        "paymentMethodType": "scheme",
        "token": "eyJhY3NSZWZlcmVuY2V...",
        "type": "threeDS2Challenge"
    }

More information: The same implementation used to work with Pleo before however recently it stopped working with the above errors

caiofaustino commented 3 years ago

Hi there, this is an issue on the side of Pleo, they are not sending in a field required by the specification to be shown in the challenge screen.

I will notify the team internally to see if there is anything we can do to reach out to them.