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

SEPA Bank Transfer payment method PaymentResponseAction cannot be deserialized

Open cristianvanderwey opened this issue 1 year ago • 3 comments

Describe the bug When using the SEPA Bank Transfer payment method the PaymentResponseAcction cannot be deserialized.

How to reproduce

Do a payment request for bankTransfer_IBAN:

{
  "amount": {
    "currency": "EUR",
    "value": 10
  },
  "countryCode" : "NL",
  "reference": "****",
  "paymentMethod": {
    "type": "bankTransfer_IBAN"
  },
  "merchantAccount": "****"
}

When deserializing the paymentsResponse:

PaymentResponse paymentsResponse = paymentsApi.payments(paymentRequest); It cannot deserialize the PaymentResponseAction:

reactor.core.Exceptions$ErrorCallbackNotImplemented: com.fasterxml.jackson.databind.JsonMappingException: Unexpected IOException (of type java.io.IOException): Failed deserialization for PaymentResponseAction: 0 classes match result, expected 1
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Unexpected IOException (of type java.io.IOException): Failed deserialization for PaymentResponseAction: 0 classes match result, expected 1

Expected behavior The PaymentResponseAction should be mapped to the right class.

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

Desktop (please complete the following information):

  • Java Version: [17]
  • Library Version: [25.0.0]

Additional context Add any other context about the problem here.

cristianvanderwey avatar Jun 05 '24 10:06 cristianvanderwey

Hi @cristianvanderwey ,

Thanks for raising this issue, and I'm sorry to hear you're dealing with these issues. Do you have a JSON response or a PsPreference so we might look into the API response and see how it mismatches with the library models?

Kind Regards, Wouter Adyen

wboereboom avatar Jun 21 '24 06:06 wboereboom

Hi Wouter thanks for your respsone! Here is the response we are receiving:

{
  "pspReference": "JMLQSQSBSH2ZTL65",
  "resultCode": "Received",
  "action": {
    "paymentMethodType": "bankTransfer_IBAN",
    "totalAmount": {
      "currency": "EUR",
      "value": 20000
    },
    "beneficiary": "Adyen",
    "iban": "NL13TEST0123456789",
    "bic": "TESTNL02",
    "reference": "JML-QSQS-BSH2-ZTL65",
    "type": "bankTransfer"
  },
  "merchantReference": "****"
}

cristianvanderwey avatar Jun 24 '24 06:06 cristianvanderwey

Hi @cristianvanderwey,

The action part cannot be deserialised as the type is not recognised by the library. We will look into adding this asap!

Best, Jilling Adyen

jillingk avatar Jun 24 '24 07:06 jillingk

Any update on this issue? Some rumours say it would be fixed / released half of august.

davince72 avatar Aug 19 '24 14:08 davince72

Hi @cristianvanderwey and @davince72!

Good news! This fix has just been released in [src/main/java/com/adyen/model/checkout/CheckoutBankTransferAction.java](https://github.com/Adyen/adyen-java-api-library/pull/1343/files#diff-88c55ec7f811accc81311abdd386ac191ab0f39e9255b461a74bbdcc4d28bfa8). 



Kind regards,



Djoyke Adyen

DjoykeAbyah avatar Sep 02 '24 09:09 DjoykeAbyah

Nice, seems to be part of Adyen Java API Library v28.3.0 https://github.com/Adyen/adyen-java-api-library/releases/tag/v28.3.0

davince72 avatar Sep 02 '24 09:09 davince72

This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs.

github-actions[bot] avatar Sep 17 '24 08:09 github-actions[bot]