Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use product and variant names for klarna product description (#5991)
Maciej Korycinski6f41dbfaa075
diff --git a/saleor/payment/gateways/adyen/tests/test_utils.py b/saleor/payment/gateways/adyen/tests/test_utils.pyindex 2d3b428358..e0dfa14e41 100644--- a/saleor/payment/gateways/adyen/tests/test_utils.py+++ b/saleor/payment/gateways/adyen/tests/test_utils.py@@ -54,7 +54,7 @@ def test_append_klarna_data(dummy_payment_data, payment_dummy, checkout_with_ite"shopperEmail": dummy_payment_data.customer_email,"lineItems": [{- "description": line.variant.product.description,+ "description": f"{line.variant.product.name}, {line.variant.name}","quantity": line.quantity,"id": line.variant.sku,"taxAmount": "0",@@ -96,7 +96,7 @@ def test_append_klarna_data_tax_included("shopperEmail": dummy_payment_data.customer_email,"lineItems": [{- "description": line.variant.product.description,+ "description": f"{line.variant.product.name}, {line.variant.name}","quantity": line.quantity,"id": line.variant.sku,"taxAmount": to_adyen_price((gross - net).amount, "USD"),diff --git a/saleor/payment/gateways/adyen/utils.py b/saleor/payment/gateways/adyen/utils.pyindex 4a113304b0..22599935de 100644--- a/saleor/payment/gateways/adyen/utils.py+++ b/saleor/payment/gateways/adyen/utils.py@@ -129,7 +129,7 @@ def append_klarna_data(payment_information: "PaymentData", payment_data: dict):"quantity": line.quantity,"amountExcludingTax": to_adyen_price(total_net, currency),"taxPercentage": round(tax_amount / total_gross * 100),- "description": line.variant.product.description,+ "description": f"{line.variant.product.name}, {line.variant.name}","id": line.variant.sku,"taxAmount": to_adyen_price(tax_amount, currency),"amountIncludingTax": to_adyen_price(total_gross, currency),