-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing paypal line items #1069
Conversation
function getLineItems({ Order: order, Basket: basket }) { | ||
if (!(order || basket)) return null; | ||
const orderOrBasket = order || basket; | ||
const allLineItems = orderOrBasket.getProductLineItems(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to pass shipping/promotions as line items? Similar we do for klarna and other open invoice methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we utilize and rename the current adyenOpenInvoiceData.js
file for passing line items also to PayPal? This way we will not have duplicated code
We can possibly do something like function getLineItems({ Order: order, Basket: basket, addTaxPercentage, includeProperties = ['amountExcludingTax', 'taxAmount', ........... })
, and conditionally pass the line items in adyenCheckout.js
@@ -143,6 +144,11 @@ function createPaymentRequest(args) { | |||
} | |||
} | |||
|
|||
//add line items for paypal | |||
if (paymentRequest.paymentMethod.type.indexOf('paypal') > -1) { | |||
paymentRequest.lineItems = paypalHelper.getLineItems(args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we decide to use adyenGetOpenInvoiceData.js
then we can pass the line items here as follows:
args.includeProperties = ['amountExcludingTax', 'taxAmount', ......];
paymentRequest.lineItems = AdyenGetOpenInvoiceData.getLineItems(args);
5995172
to
4edc344
Compare
Quality Gate failedFailed conditions |
Summary
Describe the changes proposed in this pull request:
Tested scenarios
Description of tested scenarios:
Fixed issue: #SFI-541