Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems with module


riisto

Recommended Posts

Hello.

 

My first post here on the forum. :D

 

I am trying to use a payment module from a swedish company called Paynova. Their payment process and solution is very similar to Paypal. Unfortunately it isn?t going good. The plugin is installed and i fill in the info inside oscommerce admin. I can do a testorder and after checkout the Paynova web processor window pop up. I can login to Paynova but when i confirm the transaction and their servers try to confirm the order with my oscommerce i just get an java script error message that says "transaction cancelled". I talked to Paynova and they gave me the following error log:

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /PATH/catalog/includes/functions/database.php on line 19

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /PATH/catalog/includes/functions/database.php on line 44

2002 - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

 

select configuration_value from configuration where configuration_key = 'MODULE_PAYMENT_PAYNOVA_SECRET'

 

[TEP STOP]

 

 

The shop works fine apart from this error. The communication with the Mysql server is running without problems.

 

My thoughts right now is that maybe the fact that apache and mysql is on two different physical servers is causing this problem. I have asked Paynova and i?m waiting for a response.

 

Some one that has any ideas about this?

 

Regards

Christian

Link to comment
Share on other sites

Row 19 in my database.php:

 

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

 

if (USE_PCONNECT == 'true') {

$$link = mysql_pconnect($server, $username, $password);

} else {

$$link = mysql_connect($server, $username, $password);

}

 

if ($$link) mysql_select_db($database);

 

return $$link;

}

 

 

Row 44 in my database.php:

 

function tep_db_query($query, $link = 'db_link') {

global $$link;

 

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {

error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);

}

 

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());

 

if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {

$result_error = mysql_error();

error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);

}

 

return $result;

}

Link to comment
Share on other sites

  • 4 months later...
Hello.

 

My first post here on the forum.  :D

 

I am trying to use a payment module from a swedish company called Paynova. Their payment process and solution is very similar to Paypal. Unfortunately it isn?t going good. The plugin is installed and i fill in the info inside oscommerce admin. I can do a testorder and after checkout the Paynova web processor window pop up. I can login to Paynova but when i confirm the transaction and their servers try to confirm the order with my oscommerce i just get an java script error message that says "transaction cancelled". I talked to Paynova and they gave me the following error log:

 

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /PATH/catalog/includes/functions/database.php on line 19

 

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /PATH/catalog/includes/functions/database.php on line 44

2002 - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

 

select configuration_value from configuration where configuration_key = 'MODULE_PAYMENT_PAYNOVA_SECRET'

 

[TEP STOP]

The shop works fine apart from this error. The communication with the Mysql server is running without problems.

 

My thoughts right now is that maybe the fact that apache and mysql is on two different physical servers is causing this problem. I have asked Paynova and i?m waiting for a response.

 

Some one that has any ideas about this?

 

Regards

Christian

 

Hello,

 

did you manage the problem? I am working on a shop for my Scandinavian customer and wonder if I can use paynova in os commerce. Please advice...

Link to comment
Share on other sites

  • 1 month later...

Riisto,

 

In general, you are right. Most web hosting providers don't allow connections to mySQL where

$host!='localhost'

 

However, why should Paynova go directly to the database? Aren't you receiving the data through a $_POST? If not, can't you get them to send you the data they want to check through a $_POST, so that you can properly connect to the database (through 'localhost') and do the verification for them?

 

BTW, that's how it usually works: the payserver sends over an xml file or a $_POST containing all the data they need to verify, and the eshop receives the data, does the verification locally and sends back the appropriate message.

 

Hope it helps,

 

Yiangos

Feu! Edome8a upo rhnnosxhmwn lukwn!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...