diff --git a/app/code/community/Wirecard/CheckoutPage/Helper/Data.php b/app/code/community/Wirecard/CheckoutPage/Helper/Data.php index 2d9afba..5cc328b 100644 --- a/app/code/community/Wirecard/CheckoutPage/Helper/Data.php +++ b/app/code/community/Wirecard/CheckoutPage/Helper/Data.php @@ -33,7 +33,7 @@ class Wirecard_CheckoutPage_Helper_Data extends Mage_Payment_Helper_Data { - protected $_pluginVersion = '4.2.4'; + protected $_pluginVersion = '4.2.5'; protected $_pluginName = 'Wirecard/CheckoutPage'; /** diff --git a/app/code/community/Wirecard/CheckoutPage/Model/Abstract.php b/app/code/community/Wirecard/CheckoutPage/Model/Abstract.php index 9a3098f..549dfb6 100644 --- a/app/code/community/Wirecard/CheckoutPage/Model/Abstract.php +++ b/app/code/community/Wirecard/CheckoutPage/Model/Abstract.php @@ -52,7 +52,7 @@ abstract class Wirecard_CheckoutPage_Model_Abstract extends Mage_Payment_Model_M protected $_defaultLocale = 'en'; protected $_order; - protected $_pluginVersion = '4.2.4'; + protected $_pluginVersion = '4.2.5'; protected $_pluginName = 'Wirecard/CheckoutPage'; protected $_formBlockType = 'wirecard_checkoutpage/form'; @@ -192,7 +192,11 @@ public function initPayment() { $bitem->setUnitGrossAmount( number_format( $order->getShippingInclTax(), $precision, '.', '' ) ); $bitem->setUnitNetAmount( number_format( $order->getShippingAmount(), $precision, '.', '' ) ); $bitem->setUnitTaxAmount( number_format( $order->getShippingTaxAmount(), $precision, '.', '' ) ); - $bitem->setUnitTaxRate( ( ( $bitem->getUnitGrossAmount() / $bitem->getUnitNetAmount() ) - 1 ) * 100 ); + if ( $bitem->getUnitNetAmount() > 0 ) { + $bitem->setUnitTaxRate( ( ( $bitem->getUnitGrossAmount() / $bitem->getUnitNetAmount() ) - 1 ) * 100 ); + } else { + $bitem->setUnitTaxRate( 0 ); + } $bitem->setDescription( $order->getShippingDescription() ); $bitem->setName( 'shipping' ); $basket->addItem( $bitem ); diff --git a/app/code/community/Wirecard/CheckoutPage/etc/config.xml b/app/code/community/Wirecard/CheckoutPage/etc/config.xml index 6d1c214..6704a13 100644 --- a/app/code/community/Wirecard/CheckoutPage/etc/config.xml +++ b/app/code/community/Wirecard/CheckoutPage/etc/config.xml @@ -34,7 +34,7 @@ - 4.2.4 + 4.2.5