Skip to content

Commit

Permalink
Merge pull request #22 from paynl/feature/PLUG-985
Browse files Browse the repository at this point in the history
feature/PLUG-985 : Fixed issue with non-tax-prices
  • Loading branch information
woutse authored Jun 17, 2022
2 parents aa9e593 + 628722e commit a25ae42
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion paynlpaymentmethods/paynlpaymentmethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,12 @@ public function processPayment($transactionId, &$message = null)

$cart = new Cart((int)$cartId);
$cartTotalPrice = (version_compare(_PS_VERSION_, '1.7.7.0', '>=')) ? $cart->getCartTotalPrice() : $this->getCartTotalPrice($cart);
$amountPaid = in_array($cartTotalPrice, array($transaction->getCurrencyAmount(), $transaction->getPaidCurrencyAmount(), $transaction->getPaidAmount())) ? $cartTotalPrice : null;
$arrPayAmounts = array($transaction->getCurrencyAmount(), $transaction->getPaidCurrencyAmount(), $transaction->getPaidAmount());
$amountPaid = in_array($cartTotalPrice, $arrPayAmounts) ? $cartTotalPrice : null;

if (is_null($amountPaid)) {
$amountPaid = in_array($cart->getOrderTotal(), $arrPayAmounts) ? $cart->getOrderTotal() : null;
}

if ($orderId) {

Expand Down

0 comments on commit a25ae42

Please sign in to comment.