Klarna Checkout payment method missing

Klarna Checkout (v2) is not available as a payment method in our upgraded solution. We’ve tried reinstalling (following the instructions at https://docs.litium.com/documentation/add-ons/payments/klarna), but to no avail. The list of payment methods in the settings only display the various “DirectPay” methods.
Any ideas on what’s wrong?

Litium version: 7.1.0

Most probably you are missing an binding redirect in web.config.

Can also recommend to go over and use the Klarna Checkout v3 instead of the older v2. The accelerator 7 is only pre-configured to work with v3.

What binding redirect(s) would that be? Litium.Studio.AddOns.Klarna.dll and
Litium.Studio.AddOns.Klarna.UI.dll? Doesn’t seem to change anything.

Hard to say without know what you have there… Visual Studio is also suggest missing binding redirects during build.

Yeah, no warnings during build. And nothing in the log as far I can see. The dll files (Litium.Studio.AddOns.Klarna.dll and
Litium.Studio.AddOns.Klarna.UI.dll) and the config file (Litium.Studio.AddOns.Klarna.dll.config) are in the bin folder. Not sure what’s going on.

And you don’t have the build warning as in the section for binding redirects on https://docs.litium.com/documentation/upgrading-to-litium-7 ?

Can you post the binding redirects that you have the web.config?

What version number are you using for the Klarna addon?

So, it looks like we had another project in our solution that messes things up. After fixing the binding redirects in that project’s app.config it’s working. Thanks Patric!

A follow-up question since as you say that “accelerator 7 is only pre-configured to work with v3”: What would we have to change if we wanted to stay on version 2 for now?

I know that we have the KlarnaPaymentWidgetConfig class that have some configurations and I think we will have some parts in KlarnaPaymentController and in KlarnaWidget that need to be updated to support V2 instead of V3.

What’s the time-frame you need to have this ready?

As soon as possible :wink: We’re aiming for a release sometime in March.

You can download the changed files from: https://www.dropbox.com/s/u8vhdkvcopw85d7/KlarnaCheckoutV2_Litium_Acceelerator_7.zip?dl=0

Removed files

  • /Src/Litium.Accelerator/Payments/Widgets/IKlarnaPaymentConfig.cs
  • /Src/Litium.Accelerator/Payments/Widgets/IPaymentWidget.cs
  • /Src/Litium.Accelerator/Payments/Widgets/KlarnaWidget.cs
  • /Src/Litium.Accelerator.Mvc/App_Start/KlarnaPaymentWidgetConfig.cs

Uninstall the following nuget packages from Litium.Accelerator

  • Litium.AddOns.Klarna
  • Klarna.Checkout
  • Klarna.Rest

Install the following nuget packages into Litium.Accelerator.Mvc

  • Litium.Studio.AddOns.Klarna.UI

I have applyed the patch and installed/uninstalld the nugets , Do we need to add or change a setting somewhere also?

The api still return null, for the paymentWidget

Where paymentProvider== “Klarna” the result is null :confused:

 public override IPaymentWidget GetPaymentWidget(string paymentProvider)
        {
            return paymentProvider == null
                ? null
                : IoC.Resolve(typeof(IPaymentWidget<>).MakeGenericType(IoC.ResolvePlugin<IPaymentProvider>(paymentProvider).GetType())) as IPaymentWidget;
        }

And my breakpoints in the KlarnaWidgetV2 and KlarnaWidgetV3 constructor is never activated, so KlarnaPaymentController never seam to get called, where is this supposed to take place?