diff --git a/Model/AbstractPayment.php b/Model/AbstractPayment.php index 906cbf4..8843b23 100644 --- a/Model/AbstractPayment.php +++ b/Model/AbstractPayment.php @@ -196,14 +196,8 @@ public function initPaymentByCart(CheckoutCart $cart, $urls, \Magento\Framework\ $bitem->setDescription($item->getProduct()->getName()); $bitem->setImageUrl($baseUrl . "pub/media/catalog/product" . $item->getProduct()->getImage()); $bitem->setName($item->getProduct()->getName()); - $bitem->setUnitGrossAmount(number_format($item->getPrice(), $precision, '.', '')); - $bitem->setUnitNetAmount( - number_format( - number_format($item->getPrice(), $precision, '.', '') - number_format( - $item->getTaxAmount(), $precision, '.', '' - ), $precision, '.', '' - ) - ); + $bitem->setUnitGrossAmount(number_format($item->getPriceInclTax(), $precision, '.', '')); + $bitem->setUnitNetAmount(number_format($item->getPrice(), $precision, '.', '')); $bitem->setUnitTaxAmount(number_format($item->getTaxAmount(), $precision, '.', '')); $bitem->setUnitTaxRate(number_format($item->getTaxPercent(), $precision, '.', '')); $basket->addItem($bitem, (int)$item->getQty()); @@ -216,16 +210,10 @@ public function initPaymentByCart(CheckoutCart $cart, $urls, \Magento\Framework\ $bitem->setName('shipping'); $bitem->setDescription($quote->getShippingAddress()->getShippingDescription()); $bitem->setUnitGrossAmount( - number_format($quote->getShippingAddress()->getShippingAmount(), $precision, '.', '') + number_format($quote->getShippingAddress()->getShippingInclTax(), $precision, '.', '') ); $bitem->setUnitNetAmount( - number_format( - number_format( - $quote->getShippingAddress()->getShippingAmount(), $precision, '.', '' - ) - number_format( - $quote->getShippingAddress()->getShippingTaxAmount(), $precision, '.', '' - ), $precision, '.', '' - ) + number_format($quote->getShippingAddress()->getShippingAmount(), $precision, '.', '') ); $bitem->setUnitTaxAmount( number_format($quote->getShippingAddress()->getShippingTaxAmount(), $precision, '.', '') diff --git a/Model/Payment/Eps.php b/Model/Payment/Eps.php index d2cfb18..2eb856c 100644 --- a/Model/Payment/Eps.php +++ b/Model/Payment/Eps.php @@ -60,7 +60,7 @@ public function assignData(\Magento\Framework\DataObject $data) /** @var \Magento\Quote\Model\Quote\Payment $infoInstance */ $infoInstance = $this->getInfoInstance(); - $infoInstance->setAdditionalInformation('financialInstitution', $data->getData('financialInstitution')); + $infoInstance->setAdditionalInformation('financialInstitution', $data->getDataByPath('additional_data/financialInstitution')); return $this; } diff --git a/Model/Payment/Ideal.php b/Model/Payment/Ideal.php index e4d6400..3d1f119 100644 --- a/Model/Payment/Ideal.php +++ b/Model/Payment/Ideal.php @@ -60,7 +60,7 @@ public function assignData(\Magento\Framework\DataObject $data) /** @var \Magento\Quote\Model\Quote\Payment $infoInstance */ $infoInstance = $this->getInfoInstance(); - $infoInstance->setAdditionalInformation('financialInstitution', $data->getData('financialInstitution')); + $infoInstance->setAdditionalInformation('financialInstitution', $data->getDataByPath('additional_data/financialInstitution')); return $this; } diff --git a/composer.json b/composer.json index 610fea6..481d895 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "wirecard/magento2-wcs", "description": "Wirecard Checkout Seamless", "type": "magento2-module", - "version": "1.0.2", + "version": "1.0.3", "license": [ "MIT" ], @@ -12,7 +12,7 @@ "magento/module-sales": "*", "magento/module-payment": "*", "magento/module-quote": "*", - "wirecard/checkout-client-library": "3.3.2" + "wirecard/checkout-client-library": "3.3.4" }, "autoload": { "files": [