apmuskel Posted July 16, 2014 Share Posted July 16, 2014 I am trying to install Klarna payment module. After uploading the files via FTP and logging in to admin in oscommerce I can see the klarna payment module when pressing "install module" .. i highlight the "klarna invoice" and press install. I then get back to main screen I it looks like klarna is installed but as soon as I click on something it disapere.. I am following klarnas own instucions step by step and cant figure out what I am doing wrong.. any clues? I have change the currency to SEK(swedish krona) as klarna as and so on.. Paul@Klarna 1 Quote Link to comment Share on other sites More sharing options...
♥kymation Posted July 16, 2014 Share Posted July 16, 2014 Do you mean this module? If so, it's out of date and probably won't run on a modern server. You might contact them and ask for an updated module. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Paul@Klarna Posted January 20, 2015 Share Posted January 20, 2015 Hi All I am responsible for partner & technology connections for Klarna UK. It would be good to establish some details around this requirement so that I can direct you to the correct resource. My details are; paul.stephens@@Klarna.com Kind Regards Paul Quote Link to comment Share on other sites More sharing options...
verticalhobby Posted January 18, 2016 Share Posted January 18, 2016 Hi, I am trying to install Klarna modules on Osc 2.3.4, but the install fails on errors. I've tried on clean 2.3.4 install too, but it fails there too.. Is there anyone who has got Klarna working on latest Oscommerce or is someone at klarna working on it ? Paul ? I've asked Finland Klarna support, but they didn't get it working on their test either.. Quote Link to comment Share on other sites More sharing options...
verticalhobby Posted February 8, 2016 Share Posted February 8, 2016 I can't install Klarna payment module on 2.3.4.. It works fine on 2.3.1,but can anyone give some hint what has changed in modules from 2.3.1 to 2.3.4, so I could try to find the issue ? Klarna support didn't have any solution :( The error the install script gives is: Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in /home/vertical/public_html/catalog/includes/classes/klarna/class.KlarnaUtils.php on line 1519 And the code is (I have marked the error line in bold): public function installModule($configuration) { $default = $this->getDefaultArray(); tep_db_query( 'CREATE TABLE IF NOT EXISTS `klarna_ordernum` ('. '`orders_id` INT NOT NULL , '. '`klarna_ref` VARCHAR( 50 ) NOT NULL , '. 'UNIQUE ( `orders_id` ), '. 'FOREIGN KEY ( `orders_id` ) REFERENCES ' . TABLE_ORDERS . ' ( `orders_id` )' . ');' ); foreach ($configuration as $config) { $merged = array_merge($default, $config); $query_string = implode(', ', array_keys($merged)); $query_values = implode( '", "', array_map( "mysqli_real_escape_string", array_values($merged) ) ); tep_db_query( "INSERT INTO ". TABLE_CONFIGURATION . "({$query_string}) VALUES (\"{$query_values}\")" ); } } /** * Get the default array for installation method. * * @@Return array with default values */ public function getDefaultArray() { return array( 'configuration_title' => 'null', 'configuration_key' => 'null', 'configuration_value' => '', 'configuration_description' => 'null', 'configuration_group_id' => 'null', 'sort_order' => 'null', 'use_function' => '', 'set_function' => '', 'date_added' => 'now()' ); } Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 8, 2016 Share Posted February 8, 2016 The code can't call MySQL functions directly, like mysqli_real_escape_string, without further code changes. They should be replaced with the oscommerce functions. In this case, replace mysqli_real_escape_string with tep_db_input. Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
verticalhobby Posted February 8, 2016 Share Posted February 8, 2016 Thanks a lot @@Jack_mcs ! It did the trick and now I got the Klarna module installed!. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.