Skip to content

Commit

Permalink
Merge pull request #413 from Adyen/feature/AD-222_1
Browse files Browse the repository at this point in the history
[AD-222] Fix for RECEIVED status
  • Loading branch information
kpieloch authored May 13, 2024
2 parents 32e8e8e + 25b23a7 commit aa287a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit aa287a3

Please sign in to comment.