We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 989937f3 authored by Alexandros Moraitis's avatar Alexandros Moraitis Committed by GitHub

[PW-2005] Fix klarna discount line and logo (#663)

* Fix klarna discount line and logo

* add minus to int
parent 131808fe
...@@ -192,7 +192,7 @@ class CheckoutDataBuilder implements BuilderInterface ...@@ -192,7 +192,7 @@ class CheckoutDataBuilder implements BuilderInterface
} }
$request['body'] = $requestBody; $request['body'] = $requestBody;
return $request; return $request;
} }
...@@ -241,14 +241,14 @@ class CheckoutDataBuilder implements BuilderInterface ...@@ -241,14 +241,14 @@ class CheckoutDataBuilder implements BuilderInterface
// Discount cost // Discount cost
if ($discountAmount != 0) { if ($discountAmount != 0) {
$description = __('Total Discount'); $description = __('Discount');
$itemAmount = $this->adyenHelper->formatAmount($discountAmount, $currency); $itemAmount = -$this->adyenHelper->formatAmount($discountAmount, $currency);
$itemVatAmount = "0"; $itemVatAmount = "0";
$itemVatPercentage = "0"; $itemVatPercentage = "0";
$numberOfItems = 1; $numberOfItems = 1;
$formFields['lineItems'][] = [ $formFields['lineItems'][] = [
'itemId' => 'totalDiscount', 'id' => 'Discount',
'amountExcludingTax' => $itemAmount, 'amountExcludingTax' => $itemAmount,
'taxAmount' => $itemVatAmount, 'taxAmount' => $itemVatAmount,
'description' => $description, 'description' => $description,
...@@ -272,7 +272,7 @@ class CheckoutDataBuilder implements BuilderInterface ...@@ -272,7 +272,7 @@ class CheckoutDataBuilder implements BuilderInterface
if ($priceExcludingTax !== 0) { if ($priceExcludingTax !== 0) {
$formattedTaxPercentage = $cart->getShippingAddress()->getShippingTaxAmount() / $priceExcludingTax * 100 * 100; $formattedTaxPercentage = $cart->getShippingAddress()->getShippingTaxAmount() / $priceExcludingTax * 100 * 100;
} }
$formFields['lineItems'][] = [ $formFields['lineItems'][] = [
'itemId' => 'shippingCost', 'itemId' => 'shippingCost',
'amountExcludingTax' => $formattedPriceExcludingTax, 'amountExcludingTax' => $formattedPriceExcludingTax,
......
view/base/web/images/logos/klarna.png

1.9 KB | W: | H:

view/base/web/images/logos/klarna.png

1.16 KB | W: | H:

view/base/web/images/logos/klarna.png
view/base/web/images/logos/klarna.png
view/base/web/images/logos/klarna.png
view/base/web/images/logos/klarna.png
  • 2-up
  • Swipe
  • Onion skin
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