Send additional klarna information . Klarna checkout addon

Hi, I have successfully installed the Klarna Plugin, i’m using V3 of the plugin and everything works fine.
There are just a side point where I want to extend the data sent to klarna.

In the documentation you can read that there’s a method “UpdateDataSentToKlarna” that you can use to extend the data that is sent.
Now orderlines dosent have all the properties that Klarna does support. For example I would like to add a Link and Image to each orderline.

Is this supported, just i’m missing something?

Litium Version: 5.6

Send it as json in the comments property, Litium does not send image link to Klarna.

The comments property? Where is this one located? I cant seem to find it. Are you talking about a propery on the object sent to klarna?

Yeah it is on OrderCarrier OrderRows but you are right on the KlarnaCheckoutOrder Orderlines we do not have merchant_data nor image_url properties so it is not possible to add extra information it seems.
Probably we need to upgrade the AddOn.

When will you add these properties?

I’ll discuss with R&D and get back to you.

In accelerator you have an class named KlarnaPaymentConfigV3 that have a method with the following signature.

public void UpdateDataSentToKlarna(OrderCarrier orderCarrier, KlarnaPaymentArgs paymentArgs, CheckoutOrder klarnaCheckoutOrder)

In this method you have access to the object data that is sent to Klarna and I think you can modify also the order lines with something as the following

            klarnaCheckoutOrder.OrderLines.First().ProductUrl = "...";
            klarnaCheckoutOrder.OrderLines.First().ImageUrl = "...";

The UpdateDataSentToKlarna method is executed when Klarna is making an validation call to Litium when the order is placed.

Remarks: Have not tested that this will work.

1 Like

As I state in the question, your solution is also my question why thoes properties dosent exsist. If you read the original question, that class and method is the one I’m talking about.

Thanks anyway.

CheckOutOrder class is coming from Klarna own library so Litium has no control over that class.
klarnaCheckoutOrder.OrderLines is a collection which you need to perform a ToList() on before seeing the properties in each OrderLine or use foreach method.

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