[Solved] Klarna Checkout not working
Posted: Tue Oct 12, 2021 9:26 pm
1. Your Exact OpenCart Version (e.g. 1.5.6.4, 2.3.0.2, 3.0.6.0, etc.) 2.2.0
2. Used Template/Theme Journal 2.15.1 (but that is not the issue I am investigating)
3. (Additional) Installed Extension(s)
4. (Additional) Installed Translation(s)
Hi, I have downloaded https://www.opencart.com/index.php?rout ... n_id=27099 for a client's OpenCart staging site, the version of the extension that was released on Nov, 23 2016 as it's compatible with OC 2.2.0, the extension version being 1.2.
I have installed the requisite Composer dependencies, i.e. vendor/klarna/kco_root in the project root, and have not been encountering any issues from that.
I have enabled the Klarna Account and Klarna Invoice payment extensions on the staging site as I am not sure if the Klarna Checkout payment extension depends on them (it looks like it might depend on Klarna Account being enabled) - EDIT: it looks like Klarna Checkout may be independent of these two, as they keep on disabling themselves.
The issue is that I can't seem to find Klarna Checkout as an available payment method on the checkout page.
Under Extensions > Payments > Klarna Checkout > Settings in the admin interface, of the values I can share, please refer to the following:
Allow Separate Shipping Address - No
Date Of Birth Mandatory (UK stores only) -No
Title Mandatory (UK stores only) - No
Allow Newsletter Signup - No
Total - N/A (not set)
Terms & Conditions - 0% Interest Free Credit
Status - Enabled
Under Extensions > Payments > Klarna Checkout > Order Statuses in the admin interface, everything is set to Canceled.
Under Extensions > Payments > Klarna Checkout > Accounts in the admin interface, of the values I can share, please refer to the following:
Environment (Live/Test): Test
Country: United Kingdom
Shipping Countries: UK Shipping (the only other available value in the select dropdown is UK VAT Zone)
Currency: Pound Sterling
Locale: en-gb
API Location: Europe (North America is the only available value in the select dropdown)
I haven't added the Klarna Checkout module to the Checkout page layout, as when I did this on the staging site, it caused both the cart and checkout pages to display a white screen when I visited them with a non empty cart.
I've noticed that function getMethod() - spanning lines 57 - 60 on catalog/model/payment/klarna_checkout.php - returns an empty array, whereas on the checkout page, the only available payment method doesn't return an empty array in its getMethod function, so suspect this is causing an issue?
I also suspect that, since I didn't set a total, Klarna Checkout should work regardless of total, but I am setting the total too as I am writing this to test.
I have also set Klarna Checkout to start logging, and will see if this turns up anything new.
At the moment, I cannot see anything in either the web server error log for the staging site, nor in system/storage/logs/error.log
I hope I've provided enough information, but am more than happy to provide any further details.
Thanks in advance.
2. Used Template/Theme Journal 2.15.1 (but that is not the issue I am investigating)
3. (Additional) Installed Extension(s)
4. (Additional) Installed Translation(s)
Hi, I have downloaded https://www.opencart.com/index.php?rout ... n_id=27099 for a client's OpenCart staging site, the version of the extension that was released on Nov, 23 2016 as it's compatible with OC 2.2.0, the extension version being 1.2.
I have installed the requisite Composer dependencies, i.e. vendor/klarna/kco_root in the project root, and have not been encountering any issues from that.
I have enabled the Klarna Account and Klarna Invoice payment extensions on the staging site as I am not sure if the Klarna Checkout payment extension depends on them (it looks like it might depend on Klarna Account being enabled) - EDIT: it looks like Klarna Checkout may be independent of these two, as they keep on disabling themselves.
The issue is that I can't seem to find Klarna Checkout as an available payment method on the checkout page.
Under Extensions > Payments > Klarna Checkout > Settings in the admin interface, of the values I can share, please refer to the following:
Allow Separate Shipping Address - No
Date Of Birth Mandatory (UK stores only) -No
Title Mandatory (UK stores only) - No
Allow Newsletter Signup - No
Total - N/A (not set)
Terms & Conditions - 0% Interest Free Credit
Status - Enabled
Under Extensions > Payments > Klarna Checkout > Order Statuses in the admin interface, everything is set to Canceled.
Under Extensions > Payments > Klarna Checkout > Accounts in the admin interface, of the values I can share, please refer to the following:
Environment (Live/Test): Test
Country: United Kingdom
Shipping Countries: UK Shipping (the only other available value in the select dropdown is UK VAT Zone)
Currency: Pound Sterling
Locale: en-gb
API Location: Europe (North America is the only available value in the select dropdown)
I haven't added the Klarna Checkout module to the Checkout page layout, as when I did this on the staging site, it caused both the cart and checkout pages to display a white screen when I visited them with a non empty cart.
I've noticed that function getMethod() - spanning lines 57 - 60 on catalog/model/payment/klarna_checkout.php - returns an empty array, whereas on the checkout page, the only available payment method doesn't return an empty array in its getMethod function, so suspect this is causing an issue?
I also suspect that, since I didn't set a total, Klarna Checkout should work regardless of total, but I am setting the total too as I am writing this to test.
I have also set Klarna Checkout to start logging, and will see if this turns up anything new.
At the moment, I cannot see anything in either the web server error log for the staging site, nor in system/storage/logs/error.log
I hope I've provided enough information, but am more than happy to provide any further details.
Thanks in advance.