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.
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.
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
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.
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.