SEPA Bank Transfer payment method PaymentResponseAction cannot be deserialized
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.
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
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": "****"
}
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
Any update on this issue? Some rumours say it would be fixed / released half of august.
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
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
This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs.