Skip to content

Commit

Permalink
[ECP-8653] Remove donationToken from PaymentResponseHandler (#2522)
Browse files Browse the repository at this point in the history
  • Loading branch information
khushboo-singhvi authored Mar 5, 2024
1 parent 68f549f commit 129e88b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
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
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
));
}
}

0 comments on commit 129e88b

Please sign in to comment.