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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


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.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


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: matteovisotto and 46 guests