We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 68cde1e1 authored by attilak's avatar attilak

add ratepay logo

fix format invoice line item amounts
parent 3498dd2f
...@@ -211,9 +211,10 @@ class CheckoutDataBuilder implements BuilderInterface ...@@ -211,9 +211,10 @@ class CheckoutDataBuilder implements BuilderInterface
$discountAmount += $item->getDiscountAmount(); $discountAmount += $item->getDiscountAmount();
$priceExcludingTax = $item->getPriceInclTax() - $item->getTaxAmount(); $priceExcludingTax = $item->getPriceInclTax() - $item->getTaxAmount();
$formattedPriceExcludingTax = $this->adyenHelper->formatAmount($priceExcludingTax, $currency);
$formFields['lineItems'][] = [ $formFields['lineItems'][] = [
'amountExcludingTax' => $priceExcludingTax, 'amountExcludingTax' => $formattedPriceExcludingTax,
'taxAmount' => $item->getTaxAmount(), 'taxAmount' => $item->getTaxAmount(),
'description' => $item->getName(), 'description' => $item->getName(),
'id' => $item->getId(), 'id' => $item->getId(),
...@@ -246,11 +247,12 @@ class CheckoutDataBuilder implements BuilderInterface ...@@ -246,11 +247,12 @@ class CheckoutDataBuilder implements BuilderInterface
if ($this->quote->getShippingAddress()->getShippingAmount() > 0 || $this->quote->getShippingAddress()->getShippingTaxAmount() > 0) { if ($this->quote->getShippingAddress()->getShippingAmount() > 0 || $this->quote->getShippingAddress()->getShippingTaxAmount() > 0) {
$priceExcludingTax = $this->quote->getShippingAddress()->getShippingAmount() - $this->quote->getShippingAddress()->getShippingTaxAmount(); $priceExcludingTax = $this->quote->getShippingAddress()->getShippingAmount() - $this->quote->getShippingAddress()->getShippingTaxAmount();
$formattedPriceExcludingTax = $this->adyenHelper->formatAmount($priceExcludingTax, $currency);
$taxClassId = $this->taxConfig->getShippingTaxClass($this->storeManager->getStore()->getId()); $taxClassId = $this->taxConfig->getShippingTaxClass($this->storeManager->getStore()->getId());
$formFields['lineItems'][] = [ $formFields['lineItems'][] = [
'amountExcludingTax' => $priceExcludingTax, 'amountExcludingTax' => $formattedPriceExcludingTax,
'taxAmount' => $this->quote->getShippingAddress()->getShippingTaxAmount(), 'taxAmount' => $this->quote->getShippingAddress()->getShippingTaxAmount(),
'description' => $order->getShippingDescription(), 'description' => $order->getShippingDescription(),
'quantity' => 1, 'quantity' => 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment