adyen-java-api-library icon indicating copy to clipboard operation
adyen-java-api-library copied to clipboard

allow PaymentsDetailsResponse to deserialize responses that include an 'action' parameter

Open jrparker opened this issue 2 years ago • 2 comments

Description While trying to update our SDK from version 7.1.0 to 18.0.0, I ran into an issue deserializing 3DS responses from the endpoint https://checkout-test.adyen.com/v69/payments/details

When I make a request to that endpoint similar to:

{
  "details": {
    "threeds2.fingerprint": "FINGERPRINT_DATA..."
  },
  "paymentData": "PAYMENT_DATA...",
  "threeDSAuthenticationOnly": false
}

I receive a response similar to:

{
  "resultCode": "ChallengeShopper",
  "action": {
    "paymentData": "PAYMENT_DATA...",
    "paymentMethodType": "scheme",
    "authorisationToken": "AUTHORISATION_TOKEN...",
    "subtype": "challenge",
    "token": "TOKEN...",
    "type": "threeDS2"
  }
}

It looks like PaymentsResponse and PaymentsDetailsResponse were previously updated to be two separate data models during the update to Checkout v67, but there is no action parameter in PaymentsDetailsResponse. I do not see action as a response parameter in the Checkout v69 documentation for that endpoint either, but I'm receiving a response with the action parameter from that endpoint. The fact that this endpoint documentation does not match responses I am receiving is concerning as well.

The changes in this PR allow my 3DS tests to run successfully through our test account. I've moved CheckoutPaymentsAction and ResultCodeEnum from PaymentsResponse to AbstractPaymentsResponse, where they are included in both PaymentsResponse and PaymentsDetailsResponse.

Tested scenarios I've added a unit test to ensure that the response I'm receiving from https://checkout-test.adyen.com/v69/payments/details can be deserialized to include the action data.

Fixed issue:

jrparker avatar Jun 27 '22 17:06 jrparker

Hi @jrparker,

Thanks for opening this PR.

All models in this repository are/will be auto-generated. So changing them will result in a temporary change that will be overridden once we update and generate all classes again.

I am currently in touch with our API devs to figure out why you are getting this action back from our API. Do you have a PSP reference for us to analyze?

Kind Regards, Wouter Adyen

wboereboom avatar Jun 28 '22 07:06 wboereboom

Hi @wboereboom,

A pspReference I have for this is LLK44J4FF4BLNK82. I am also able to see the request / response in our Adyen instance API Logs within the Adyen UI that shows the action parameter being returned for the call to the /checkout/v69/payments/details endpoint.

Please let me know if there is any other information you need.

jrparker avatar Jun 28 '22 14:06 jrparker

Hello @jrparker,

Thank you for your contribution. We are planning to autogenerate the models so all the abstract classes in the models would be overwritten. The new models are going to be released soon.

kind regards, Alexandros Adyen

AlexandrosMor avatar Sep 21 '22 12:09 AlexandrosMor