Zen Cart Logo
Forums / Bug Reports / [duplicate] incorrect DB config for LinkPoint module for Zencart V1.3.7.1

[duplicate] incorrect DB config for LinkPoint module for Zencart V1.3.7.1

Locked

Views: 1,783

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
10 May 2008, 12:01 AM
#1
apathy avatar

apathy

New Zenner

Join Date:
Sep 2007
Posts:
60
Plugin Contributions:
0

[duplicate] incorrect DB config for LinkPoint module for Zencart V1.3.7.1

LinkPoint module for Zencart V1.3.7.1 generates mySQL errors when user is trying to confirm purchase. My linkpoint gateway is working fine but I am getting mysql errors when trying to place orders. The mySQL error I am getting is:

"1265 Data truncated for column 'lp_trans_num' at row 1
in:
[update orders set lp_trans_num ='4162D97C-4824C20E-998-AFA3C' where orders_id = '14']".

The "orders" table has a column called "lp_trans_num" of type int(11) and the script is trying to stuff a varchar number like this in it "4162D97C-4824C20E-998-AFA3C" which is generating a mySQL error. This is in Production Mode. That number in the sql statement is the same as "Order Number" when i login to the YourPay site to view my transactions. Again it is what the YourPay site describes as ORDER NUMBER and NOT the transaction number. The Trans ID for an order in my YourPay site was a 12 digit integer which would still not fit into lp_trans_num int(11) either. After looking at another table called linkpoint_api in zencart database i noticed that it too has a column called lp_trans_num but unlike the orders table it has a type of varchar(64) not int(11). This database does not seem to be configured correctly. I am scared to make the changes less I know what the outcome could be since i did not write this module and dont know exactly how it works. This module has obviously been configured wrong and I need to know how to fix it. It is the built in module so it should not be giving me problems! By the way when trying to place an order in Test Mode i get another error except because it is trying to put an empty string in to lp_trans_num which is also illegal.

Also, the LinkPoint gateway is working fine on its side. Logging into their site shows the correct orders and transaction. It is the zencart module that is not getting and storing the correct information into the database and generating sql errors as it tries to.

After changing the lp_trans_num in the orders table from type int(11) to varchar(64) it is now storing the "transaction number". The database was obviously configured wrong in this file /includes/modules/payment/linkpoint_api.php line 591: $sql = "ALTER TABLE " . TABLE_ORDERS . " ADD lp_trans_num int(11) NOT NULL DEFAULT 0"; This shuold be changed from int(11) to varchar(64) by the ZenCart team.....

10 May 2008, 4:13 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: [duplicate] incorrect DB config for LinkPoint module for Zencart V1.3.7.1

As has been said in your duplicate post about the same topic (a practice which is frowned upon), the issue was already posted and fixed for v1.3.8.

Bug reports on old versions aren't very useful, especially when they've already been fixed in an already-released newer version.

12 May 2008, 7:29 AM
#3
apathy avatar

apathy

New Zenner

Join Date:
Sep 2007
Posts:
60
Plugin Contributions:
0

Re: [duplicate] incorrect DB config for LinkPoint module for Zencart V1.3.7.1

I am sorry, no one was responding so I figured everyone was clueless or something. I guess i should look at what was fixed on other versions, but i thought something this important would be fixed in any version and that updates were more of improvements not fixing something that is totally dysfunctional, but alas i was wrong. Thank you for the response, i really wanted a confirmation that the change i made to the column wasnt going to break something later. Thanks. -sandy