Skip to content

Commit

Permalink
Update AdyenOrderPayment.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Dejan Karakashov committed Mar 14, 2022
1 parent 423ca52 commit 0e867d7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Helper/AdyenOrderPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ public function createAdyenOrderPayment(Order $order, Notification $notification
{
$adyenOrderPayment = null;
$payment = $order->getPayment();
$amount = $this->adyenDataHelper->originalAmount($notification->getAmountValue(), $order->getOrderCurrencyCode());
$chargedCurrencyCode = $this->adyenChargedCurrencyHelper->getChargedCurrency() === "display"
? $order->getOrderCurrencyCode() : $order->getBaseCurrencyCode();
$amount = $this->adyenDataHelper->originalAmount($notification->getAmountValue(), $chargedCurrencyCode);
$captureStatus = $autoCapture ? Payment::CAPTURE_STATUS_AUTO_CAPTURE : Payment::CAPTURE_STATUS_NO_CAPTURE;
$merchantReference = $notification->getMerchantReference();
$pspReference = $notification->getPspreference();
Expand Down

0 comments on commit 0e867d7

Please sign in to comment.