From d9dbbad85a10e8e87761bb869cb24bebe2883730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20S=C5=82awik?= Date: Tue, 25 May 2021 09:40:06 +0200 Subject: [PATCH] WOOD-626 Update 3DS1 processing --- Service/AdyenThreeDS1Process.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Service/AdyenThreeDS1Process.php b/Service/AdyenThreeDS1Process.php index 4c5692e..67b1245 100644 --- a/Service/AdyenThreeDS1Process.php +++ b/Service/AdyenThreeDS1Process.php @@ -34,7 +34,8 @@ public function __construct( public function authorisePayment($payment, string $md, $paRes) : void { - if ($payment->getAdditionalInformation('md') === $md) { + $actionData = $payment->getAdditionalInformation('action'); + if (isset($actionData['data']['MD']) && $actionData['data']['MD'] === $md) { $result = $this->authorise3d($payment, $paRes); $responseCode = $result['resultCode']; if ($responseCode == 'Authorised') { @@ -89,7 +90,7 @@ private function authorise3d(\Magento\Payment\Model\InfoInterface $payment, stri return $service->paymentsDetails([ 'paymentData' => $payment->getAdditionalInformation('paymentData'), 'details' => [ - 'MD' => $payment->getAdditionalInformation('md'), + 'MD' => $payment->getAdditionalInformation('action')['data']['MD'], 'PaRes' => $paRes ] ]);