Post by extralevel » Tue Mar 06, 2018 9:27 pm

Hello,

After updating to Opencart version 3.0.2.0, I am now trying to install the payment module Klarna Checkout. However, as soon as I go to the configuration page, I am met with the following error:

"Internal Server Error
<b>Notice</b>: Undefined index: api_token in <b>/home/[website]/domains/[website.com]/public_html/catalog/controller/startup/session.php</b> on line <b>8</b> <b>Notice</b>: Undefined index: username in <b>/home/[website]/domains/[website.com]/public_html/catalog/controller/api/login.php</b> on line <b>11</b> "

I have tried to follow the instructions provided here by straightlight: https://github.com/opencart/opencart/issues/6014
However, the problem persists. What could be causing this issue and how do I solve it? Before the update, Klarna Checkout was working.

Newbie

Posts

Joined
Tue Mar 06, 2018 9:12 pm

Post by straightlight » Sat Mar 10, 2018 12:33 am

The posted instructions on the pointed topic have nothing to do with the error messages you are reporting on this topic. You have referred my username in your first post without knowing if this was the actual issue even when noticing if it was really working previously based on your assumption or rather based on a direction in the platform where it could not be reached until applying the provided fixes which then shows these errors.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by straightlight » Sat Mar 10, 2018 12:42 am

In catalog/startup/session.php file,

find:

Code: Select all

if (isset($this->request->get['route']) && substr($this->request->get['route'], 0, 4) == 'api/') {
replace with:

Code: Select all

if (isset($this->request->get['route']) && substr($this->request->get['route'], 0, 4) == 'api/' && !empty($this->request->get['api_token']) && isset($this->request->server['REMOTE_ADDR'])) {
See if that rectifies the issue about the api_token error message.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Storeship » Wed Apr 25, 2018 6:05 pm

Thanks that solved my problem.

Newbie

Posts

Joined
Wed Sep 07, 2016 7:00 pm
Who is online

Users browsing this forum: No registered users and 4 guests