From 9a05de923cd2350df638dd622680ad3a1ace7611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20S=C5=82awik?= Date: Wed, 21 Apr 2021 12:55:32 +0200 Subject: [PATCH 1/3] Adyen module dependency bump to 7.0 --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index b8c45fe..f8916b5 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,9 @@ { "name": "wearejh/m2-module-adyen-payment", "description": "Adyen Payment module extension to support headless frontend", + "version": "2.0.0", "require": { - "adyen/module-payment": "^6.6" + "adyen/module-payment": ">=7.0" }, "autoload": { "files": [ From 6ff219fc6db719761dd00c480f6afd0bba88e002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20S=C5=82awik?= Date: Fri, 30 Apr 2021 14:34:30 +0200 Subject: [PATCH 2/3] Fix constructor after parent class was updated --- Gateway/Request/CheckoutDataBuilder.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Gateway/Request/CheckoutDataBuilder.php b/Gateway/Request/CheckoutDataBuilder.php index a935602..da56917 100644 --- a/Gateway/Request/CheckoutDataBuilder.php +++ b/Gateway/Request/CheckoutDataBuilder.php @@ -5,8 +5,10 @@ namespace Jh\AdyenPayment\Gateway\Request; use Adyen\Payment\Gateway\Request\CheckoutDataBuilder as OrigCheckoutDataBuilder; +use Adyen\Payment\Helper\ChargedCurrency; use Adyen\Payment\Helper\Data; use Adyen\Payment\Model\Gender; +use Magento\Framework\UrlInterface; use Magento\Store\Model\StoreManagerInterface; use Magento\Quote\Api\CartRepositoryInterface; @@ -18,9 +20,11 @@ public function __construct( Data $adyenHelper, StoreManagerInterface $storeManager, CartRepositoryInterface $cartRepository, - Gender $gender + Gender $gender, + ChargedCurrency $chargedCurrency, + UrlInterface $url ) { - parent::__construct($adyenHelper, $storeManager, $cartRepository, $gender); + parent::__construct($adyenHelper, $storeManager, $cartRepository, $gender, $chargedCurrency, $url); $this->adyenHelper = $adyenHelper; } 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 3/3] 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 ] ]);