# Klarna Checkout error when using domain name prefix

**URL:** <https://forum.litium.com/t/klarna-checkout-error-when-using-domain-name-prefix/1878>\
**Category:** Questions\
**Tags:** klarna, payment, litium-7\
**Created:** [February 11, 2021, 1:18pm UTC](https://forum.litium.com/t/klarna-checkout-error-when-using-domain-name-prefix/1878 "2021-02-11T13:18:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/johan/32/357_2.png) [@Johan](https://forum.litium.com/u/Johan)\
**Post date:** [February 11, 2021, 1:18pm UTC](https://forum.litium.com/t/klarna-checkout-error-when-using-domain-name-prefix/1878/1 "2021-02-11T13:18:08Z")

</div>

We get some critical errors when using Klarna Checkout and have a few language channels with the same domain name but with different prefixes, like this:

[example.com/se](http://example.com/se)  
[example.com/en](http://example.com/en)  
[example.com/dk](http://example.com/dk)

If you first visit the dk site and then add a few products to the cart; then go to the checkout page,  
The order total on the Klarna plugin is 50 €. Language and address requirements are in Danish. So far its correct.

But if you then go to [example.com/se](http://example.com/se) and visit the checkout page, the order total in Klarna Checkout is:  
50 kr (Correct would be 500 kr). The Klarna plugin language is now swedish, but the address requirement is still Danish.

How can we fix this issue?

Litium version: 7.4.3

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [February 11, 2021, 4:59pm UTC](https://forum.litium.com/t/klarna-checkout-error-when-using-domain-name-prefix/1878/2 "2021-02-11T16:59:35Z")

</div>

I believe the issue occurs because the same `OrderCarrier` is used after switching channels, and it has a reference to the Klarna order that was initiated on your first visit to the checkout page. If a reference exists it will try to re-use the same Klarna order.

Maybe you could try clearing the payments and deliveries of the order carrier to force a refresh?

In `ControllerBase.Initialize` there’s a check if the channel on the order carrier doesn’t match the channel on the current request, try adding this before the call to `cart.SetChannel(…)´.

```auto
cart.OrderCarrier?.Deliveries?.Clear();
cart.OrderCarrier?.PaymentInfo?.Clear();

```

---

<div class="post-metadata">

**Author:** ![Johan](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/johan/32/357_2.png) [@Johan](https://forum.litium.com/u/Johan)\
**Post date:** [February 12, 2021, 4:29pm UTC](https://forum.litium.com/t/klarna-checkout-error-when-using-domain-name-prefix/1878/3 "2021-02-12T16:29:25Z")

</div>

It works great! Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [March 12, 2021, 4:29pm UTC](https://forum.litium.com/t/klarna-checkout-error-when-using-domain-name-prefix/1878/4 "2021-03-12T16:29:59Z")

</div>

Closed on March 12, 2021, 4:29pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
