Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Adyen Magento2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shared Libs
Adyen Magento2
Commits
e77c1fea
Commit
e77c1fea
authored
Dec 11, 2020
by
alexandros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove itemId from line items as it is not compatible with Adyen api v64
parent
28277d69
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
13 deletions
+3
-13
Gateway/Request/CheckoutDataBuilder.php
Gateway/Request/CheckoutDataBuilder.php
+0
-2
Helper/Data.php
Helper/Data.php
+3
-11
No files found.
Gateway/Request/CheckoutDataBuilder.php
View file @
e77c1fea
...
@@ -260,7 +260,6 @@ class CheckoutDataBuilder implements BuilderInterface
...
@@ -260,7 +260,6 @@ class CheckoutDataBuilder implements BuilderInterface
$formFields
[
'lineItems'
][]
=
[
$formFields
[
'lineItems'
][]
=
[
'id'
=>
$item
->
getId
(),
'id'
=>
$item
->
getId
(),
'itemId'
=>
$item
->
getId
(),
'amountExcludingTax'
=>
$formattedPriceExcludingTax
,
'amountExcludingTax'
=>
$formattedPriceExcludingTax
,
'taxAmount'
=>
$formattedTaxAmount
,
'taxAmount'
=>
$formattedTaxAmount
,
'description'
=>
$item
->
getName
(),
'description'
=>
$item
->
getName
(),
...
@@ -310,7 +309,6 @@ class CheckoutDataBuilder implements BuilderInterface
...
@@ -310,7 +309,6 @@ class CheckoutDataBuilder implements BuilderInterface
}
}
$formFields
[
'lineItems'
][]
=
[
$formFields
[
'lineItems'
][]
=
[
'itemId'
=>
'shippingCost'
,
'amountExcludingTax'
=>
$formattedPriceExcludingTax
,
'amountExcludingTax'
=>
$formattedPriceExcludingTax
,
'taxAmount'
=>
$formattedTaxAmount
,
'taxAmount'
=>
$formattedTaxAmount
,
'description'
=>
$order
->
getShippingDescription
(),
'description'
=>
$order
->
getShippingDescription
(),
...
...
Helper/Data.php
View file @
e77c1fea
...
@@ -1267,8 +1267,7 @@ class Data extends AbstractHelper
...
@@ -1267,8 +1267,7 @@ class Data extends AbstractHelper
$priceInclTax
,
$priceInclTax
,
$taxPercent
,
$taxPercent
,
$numberOfItems
,
$numberOfItems
,
$payment
,
$payment
$itemId
=
null
)
{
)
{
$description
=
str_replace
(
"
\n
"
,
''
,
trim
(
$name
));
$description
=
str_replace
(
"
\n
"
,
''
,
trim
(
$name
));
$itemAmount
=
$this
->
formatAmount
(
$price
,
$currency
);
$itemAmount
=
$this
->
formatAmount
(
$price
,
$currency
);
...
@@ -1292,8 +1291,7 @@ class Data extends AbstractHelper
...
@@ -1292,8 +1291,7 @@ class Data extends AbstractHelper
$itemVatAmount
,
$itemVatAmount
,
$itemVatPercentage
,
$itemVatPercentage
,
$numberOfItems
,
$numberOfItems
,
$payment
,
$payment
$itemId
);
);
}
}
...
@@ -1393,16 +1391,10 @@ class Data extends AbstractHelper
...
@@ -1393,16 +1391,10 @@ class Data extends AbstractHelper
$itemVatAmount
,
$itemVatAmount
,
$itemVatPercentage
,
$itemVatPercentage
,
$numberOfItems
,
$numberOfItems
,
$payment
,
$payment
$itemId
=
null
)
{
)
{
$linename
=
"line"
.
$count
;
$linename
=
"line"
.
$count
;
// item id is optional
if
(
$itemId
)
{
$formFields
[
'openinvoicedata.'
.
$linename
.
'.itemId'
]
=
$itemId
;
}
$formFields
[
'openinvoicedata.'
.
$linename
.
'.currencyCode'
]
=
$currencyCode
;
$formFields
[
'openinvoicedata.'
.
$linename
.
'.currencyCode'
]
=
$currencyCode
;
$formFields
[
'openinvoicedata.'
.
$linename
.
'.description'
]
=
$description
;
$formFields
[
'openinvoicedata.'
.
$linename
.
'.description'
]
=
$description
;
$formFields
[
'openinvoicedata.'
.
$linename
.
'.itemAmount'
]
=
$itemAmount
;
$formFields
[
'openinvoicedata.'
.
$linename
.
'.itemAmount'
]
=
$itemAmount
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment