diff --git a/Controllers/Frontend/Adyen.php b/Controllers/Frontend/Adyen.php index bb70223e..c3056ffb 100644 --- a/Controllers/Frontend/Adyen.php +++ b/Controllers/Frontend/Adyen.php @@ -243,6 +243,7 @@ private function handlePaymentData($paymentInfo): void !$resultCode->equals(PaymentResultCode::authorised()) && !$resultCode->equals(PaymentResultCode::identifyShopper()) && !$resultCode->equals(PaymentResultCode::challengeShopper()) && + !$resultCode->equals(PaymentResultCode::pending()) && !$resultCode->equals(PaymentResultCode::redirectShopper()) ) { $this->handlePaymentDataError($paymentInfo); @@ -262,6 +263,11 @@ private function handlePaymentDataError(array $paymentResponseInfo): void { if (array_key_exists('merchantReference', $paymentResponseInfo)) { $this->basketService->cancelAndRestoreByOrderNumber($paymentResponseInfo['merchantReference']); + return; + } + + if (isset($paymentResponseInfo['action']['merchantReference'])) { + $this->basketService->cancelAndRestoreByOrderNumber($paymentResponseInfo['action']['merchantReference']); } } }