Commit e77c1fea authored by alexandros's avatar alexandros

Remove itemId from line items as it is not compatible with Adyen api v64

parent 28277d69
......@@ -260,7 +260,6 @@ class CheckoutDataBuilder implements BuilderInterface
$formFields['lineItems'][] = [
'id' => $item->getId(),
'itemId' => $item->getId(),
'amountExcludingTax' => $formattedPriceExcludingTax,
'taxAmount' => $formattedTaxAmount,
'description' => $item->getName(),
......@@ -310,7 +309,6 @@ class CheckoutDataBuilder implements BuilderInterface
}
$formFields['lineItems'][] = [
'itemId' => 'shippingCost',
'amountExcludingTax' => $formattedPriceExcludingTax,
'taxAmount' => $formattedTaxAmount,
'description' => $order->getShippingDescription(),
......
......@@ -1267,8 +1267,7 @@ class Data extends AbstractHelper
$priceInclTax,
$taxPercent,
$numberOfItems,
$payment,
$itemId = null
$payment
) {
$description = str_replace("\n", '', trim($name));
$itemAmount = $this->formatAmount($price, $currency);
......@@ -1292,8 +1291,7 @@ class Data extends AbstractHelper
$itemVatAmount,
$itemVatPercentage,
$numberOfItems,
$payment,
$itemId
$payment
);
}
......@@ -1393,16 +1391,10 @@ class Data extends AbstractHelper
$itemVatAmount,
$itemVatPercentage,
$numberOfItems,
$payment,
$itemId = null
$payment
) {
$linename = "line" . $count;
// item id is optional
if ($itemId) {
$formFields['openinvoicedata.' . $linename . '.itemId'] = $itemId;
}
$formFields['openinvoicedata.' . $linename . '.currencyCode'] = $currencyCode;
$formFields['openinvoicedata.' . $linename . '.description'] = $description;
$formFields['openinvoicedata.' . $linename . '.itemAmount'] = $itemAmount;
......
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