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
f4faba85
Commit
f4faba85
authored
Dec 11, 2020
by
alexandros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Remove itemId from line items as it is not compatible with Adyen api v64"
It is fixed in rc 7 This reverts commit
e77c1fea
.
parent
e77c1fea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
Gateway/Request/CheckoutDataBuilder.php
Gateway/Request/CheckoutDataBuilder.php
+2
-0
Helper/Data.php
Helper/Data.php
+11
-3
No files found.
Gateway/Request/CheckoutDataBuilder.php
View file @
f4faba85
...
@@ -260,6 +260,7 @@ class CheckoutDataBuilder implements BuilderInterface
...
@@ -260,6 +260,7 @@ 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
(),
...
@@ -309,6 +310,7 @@ class CheckoutDataBuilder implements BuilderInterface
...
@@ -309,6 +310,7 @@ 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 @
f4faba85
...
@@ -1267,7 +1267,8 @@ class Data extends AbstractHelper
...
@@ -1267,7 +1267,8 @@ 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
);
...
@@ -1291,7 +1292,8 @@ class Data extends AbstractHelper
...
@@ -1291,7 +1292,8 @@ class Data extends AbstractHelper
$itemVatAmount
,
$itemVatAmount
,
$itemVatPercentage
,
$itemVatPercentage
,
$numberOfItems
,
$numberOfItems
,
$payment
$payment
,
$itemId
);
);
}
}
...
@@ -1391,10 +1393,16 @@ class Data extends AbstractHelper
...
@@ -1391,10 +1393,16 @@ 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