Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 8.22.8 #2536

Merged
merged 4 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Helper/PaymentResponseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Adyen\Payment\Model\Ui\AdyenOneclickConfigProvider;
use Adyen\Payment\Observer\AdyenHppDataAssignObserver;
use Exception;
use Magento\Framework\Exception\LocalizedException;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Sales\Model\Order\Payment;
use Magento\Sales\Model\ResourceModel\Order;
Expand Down Expand Up @@ -89,7 +90,7 @@ class PaymentResponseHandler
*
* @param AdyenLogger $adyenLogger
* @param Data $adyenHelper
* @param \Adyen\Payment\Helper\Vault $vaultHelper
* @param Vault $vaultHelper
*/
public function __construct(
AdyenLogger $adyenLogger,
Expand All @@ -113,7 +114,7 @@ public function __construct(
$this->paymentMethodFactory = $paymentMethodFactory;
}

public function formatPaymentResponse($resultCode, $action = null, $additionalData = null, $donationToken = null)
public function formatPaymentResponse($resultCode, $action = null, $additionalData = null)
{
switch ($resultCode) {
case self::AUTHORISED:
Expand All @@ -122,8 +123,7 @@ public function formatPaymentResponse($resultCode, $action = null, $additionalDa
case self::POS_SUCCESS:
return [
"isFinal" => true,
"resultCode" => $resultCode,
"donationToken" => $donationToken
"resultCode" => $resultCode
];
case self::REDIRECT_SHOPPER:
case self::IDENTIFY_SHOPPER:
Expand Down Expand Up @@ -159,7 +159,7 @@ public function formatPaymentResponse($resultCode, $action = null, $additionalDa
* @param Payment $payment
* @param OrderInterface|null $order
* @return bool
* @throws \Magento\Framework\Exception\LocalizedException
* @throws LocalizedException
*/
public function handlePaymentResponse($paymentsResponse, $payment, $order = null)
{
Expand Down
4 changes: 3 additions & 1 deletion Helper/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ private function updateAdyenAttributes(Order $order, Notification $notification)
* the previous notification was authorisation : true do not update pspreference
*/
if (!$notification->isSuccessful()) {
$previousAdyenEventCode = $order->getData('adyen_notification_event_code');
$previousAdyenEventCode = $this->orderRepository
->get($order->getId())
->getData('adyen_notification_event_code');
if ($previousAdyenEventCode != "AUTHORISATION : TRUE") {
$this->updateOrderPaymentWithAdyenAttributes($order->getPayment(), $notification, $additionalData);
}
Expand Down
5 changes: 2 additions & 3 deletions Model/Api/AdyenOrderPaymentStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Adyen\Payment\Helper\PaymentResponseHandler;
use Adyen\Payment\Logger\AdyenLogger;
use Magento\Sales\Api\OrderRepositoryInterface;
use \Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Exception\NoSuchEntityException;

class AdyenOrderPaymentStatus implements AdyenOrderPaymentStatusInterface
{
Expand Down Expand Up @@ -89,8 +89,7 @@ public function getOrderPaymentStatus($orderId)
return json_encode($this->paymentResponseHandler->formatPaymentResponse(
$additionalInformation['resultCode'],
!empty($additionalInformation['action']) ? $additionalInformation['action'] : null,
!empty($additionalInformation['additionalData']) ? $additionalInformation['additionalData'] : null,
!empty($additionalInformation['donationToken']) ? $additionalInformation['donationToken'] : null
!empty($additionalInformation['additionalData']) ? $additionalInformation['additionalData'] : null
));
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "adyen/module-payment",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
"type": "magento2-module",
"version": "8.22.7",
"version": "8.22.8",
"license": "MIT",
"repositories": [
{
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Adyen_Payment" setup_version="8.22.7">
<module name="Adyen_Payment" setup_version="8.22.8">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Quote"/>
Expand Down
Loading