From 25b23a7e76169d5c02c379ca68841ff3e7dacf02 Mon Sep 17 00:00:00 2001 From: kpieloch <113994423+kpieloch@users.noreply.github.com> Date: Mon, 13 May 2024 13:32:21 +0200 Subject: [PATCH] [AD-222] Fix for RECEIVED status --- .../facades/impl/DefaultAdyenCheckoutApiFacade.java | 6 ++++-- .../adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/adyenv6core/src/com/adyen/commerce/facades/impl/DefaultAdyenCheckoutApiFacade.java b/adyenv6core/src/com/adyen/commerce/facades/impl/DefaultAdyenCheckoutApiFacade.java index bcaed62b..40ca5242 100644 --- a/adyenv6core/src/com/adyen/commerce/facades/impl/DefaultAdyenCheckoutApiFacade.java +++ b/adyenv6core/src/com/adyen/commerce/facades/impl/DefaultAdyenCheckoutApiFacade.java @@ -120,12 +120,14 @@ public OrderData placeOrderWithAdditionalDetails(PaymentDetailsRequest detailsRe PaymentDetailsResponse paymentsDetailsResponse = this.componentDetails(detailsRequest); - if (PaymentDetailsResponse.ResultCodeEnum.PENDING == paymentsDetailsResponse.getResultCode() || PaymentDetailsResponse.ResultCodeEnum.REDIRECTSHOPPER == paymentsDetailsResponse.getResultCode()) { + if (PaymentDetailsResponse.ResultCodeEnum.PENDING == paymentsDetailsResponse.getResultCode() || + PaymentDetailsResponse.ResultCodeEnum.REDIRECTSHOPPER == paymentsDetailsResponse.getResultCode()) { LOGGER.info("Placing pending order"); placePendingOrder(paymentsDetailsResponse.getResultCode().getValue()); throw new AdyenNonAuthorizedPaymentException(paymentsDetailsResponse); } - if (PaymentDetailsResponse.ResultCodeEnum.AUTHORISED == paymentsDetailsResponse.getResultCode()) { + if (PaymentDetailsResponse.ResultCodeEnum.AUTHORISED == paymentsDetailsResponse.getResultCode() || + PaymentDetailsResponse.ResultCodeEnum.RECEIVED == paymentsDetailsResponse.getResultCode()) { LOGGER.info("Creating authorized order"); String orderCode = paymentsDetailsResponse.getMerchantReference(); OrderModel orderModel = retrievePendingOrder(orderCode); diff --git a/adyenv6core/src/com/adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java b/adyenv6core/src/com/adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java index 110a596f..833a8187 100644 --- a/adyenv6core/src/com/adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java +++ b/adyenv6core/src/com/adyen/v6/facades/impl/DefaultAdyenCheckoutFacade.java @@ -540,7 +540,7 @@ public OrderData handle3DSResponse(PaymentDetailsRequest paymentsDetailsRequest) PaymentDetailsResponse.ResultCodeEnum resultCode = paymentsDetailsResponse.getResultCode(); - if (PaymentDetailsResponse.ResultCodeEnum.AUTHORISED.equals(resultCode)) { + if (PaymentDetailsResponse.ResultCodeEnum.AUTHORISED.equals(resultCode) || PaymentDetailsResponse.ResultCodeEnum.RECEIVED.equals(resultCode)) { return getOrderConverter().convert(orderModel); }