Adyen / adyen-magento2

Adyen Payment plugin for Magento2
MIT License
150 stars 196 forks source link

[ECP-9133][ECP-9225] Unable to place an order with discount code using Klarna #2580

Open piotrmatras opened 3 months ago

piotrmatras commented 3 months ago

Describe the bug Unable to place an order with discount code using Klarna payment method. I'm receiving the following error from payment gateway: Internal error: Result from Open Invoice service does not contain a redirect URL Error code: 903

Example quote details: Subtotal: 79,95€ Discount: -8,00€ Shipping cost: 4,80€ Tax: 13,53€ (19% German tax) Grand total: 76,65€

Request payload (see attached screen below): amount: 7665 [ok] lineItems:

Screenshot-2024-04-10-at-10-53-15 (1)

To Reproduce Steps to reproduce the behavior:

  1. Add product to cart
  2. Apply a discount code with -10% discount
  3. Go to checkout and try to place an order using Klarna method

Expected behavior I'm able to place an order including discount code.

Magento version 2.4.6

Plugin version 9.4.0, 9.4.1

Screenshots Screenshot 2024-04-10 at 10 49 12

RokPopov commented 2 months ago

Hi @piotrmatras, we tried to reproduce the issue with the default tax calculation settings, it doesn't cause an issue. Would you be able to share all of the settings from the following page:

Could you please also clarify whether you have multicurrency setup and if you are also applying 10% discount on shipping?

Thank you in advance!

piotrmatras commented 2 months ago

HI @RokPopov See screenshots below image image

candemiralp commented 2 months ago

Hello @piotrmatras,

Thank you for providing the information above. With the configuration values that you have provided, we've successfully reproduced the issue. It looks like line item calculator has a bug if Apply customer tax is set to Before.

We've created an internal ticket to fix it.

Best regards, Can