Skip to content

Commit

Permalink
Merge pull request #3 from paynl/feature/PLUG-1811
Browse files Browse the repository at this point in the history
PLUG-1811 - Fixed error which occured on zero-priced products
  • Loading branch information
woutse authored Mar 3, 2023
2 parents 9f90bc8 + 1dd6f67 commit b6751ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/addons/paynl_addon/addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<id>paynl_addon</id>
<name>PAY.</name>
<description>PAY. Gateway addon</description>
<version>1.1.8</version>
<version>1.1.9</version>
<priority>1000</priority>
<settings layout="separate">
<sections>
Expand Down
6 changes: 2 additions & 4 deletions app/addons/paynl_addon/func.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function getObjectData()
{
$phpVersion = substr(phpversion(), 0, 3);
$cscartVersion = defined('PRODUCT_VERSION') ? PRODUCT_VERSION : '-';
$payPlugin = '1.1.8';
$payPlugin = '1.1.9';

return substr('cscart ' . $payPlugin . ' | ' . $cscartVersion . ' | ' . $phpVersion, 0, 64);
}
Expand Down Expand Up @@ -97,9 +97,7 @@ function fn_paynl_startTransaction($order_id, $order_info, $processor_data, $exc

foreach ($order_info['products'] as $key => $product) {
$prices = paynl_getTaxForItem($order_info, $key);

$taxPercent = $prices['tax_amount'] / $prices['price_excl'] * 100;

$taxPercent = empty($prices['price_excl']) ? 0 : ($prices['tax_amount'] / $prices['price_excl'] * 100);
$taxClass = paynl_getTaxClass($taxPercent);

$payNL->addProduct(
Expand Down

0 comments on commit b6751ec

Please sign in to comment.