Anonymous in Klarna Checkout V3


We are using add-on for Klarna Checkout V3 and checkout page from Accelerator Webforms 6.3.1.
When showing Klarna widget surname is always “Anonymous”, see image 1 below.
Klarna tells us this is because we send family_name: Anonymous when calling their API, see image 2 below.
How can we fix this?

BR Jonas

Litium.AddOns.Klarna version: 4.7.102
Litium version: 4.8.4


In your solution, please check the KlarnaPaymentConfigXX.cs file, there should be a GetWidget method, where the call to Klarna is made, to get the Klarna’s widget, which is rendered as the form you see. Please check the data that is sent to Klarna to see if there is the “Anonymous” last name. Then we can trace back why the value is there.

I don’t have the file KlarnaPaymentConfig in my solution and I cant find it in Accelerator Webforms 6.3.1.
Where should it be?

If you have followed this doc, there should be a file named KlarnaPaymentWidgetConfigV3.cs in the solution:

I think the KlarnaPaymentWidgetConfigV3 was introduced in the Mvc-version of the accelerator and does not exists in the WebForms version.

In older versions of Litium it exists an unwanted feature in Litium.Foundation.Modules.ECommerce.Plugins.CustomerInfo.ICustomerInfoFactory implementation that was setting the last name to Anonymous and that is what is visible here.

to solve that, implement an own ICustomerInfoFactory that not will add the last name if the user not is logged in.

1 Like

We are not using Mvc, we are using Accelerator Webforms 6.3.1. Are you sure the file is there?
(If yes, can you tell me where? I can see the file in Mvc accelerator in folder but we are using webforms accelerator)

Ok, thank you. I will have a look.

Thanks @patric.forsgard, this is how we solved it:

public class CustomerInfoFactoryExt : CustomerInfoFactory
    public override CustomerInfoCarrier Create(Guid userId, SecurityToken token)
        var result = base.Create(userId, token);

        if (result.Address.LastName.Equals("Anonymous"))
            result.Address.LastName = null;

        return result;