Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / mySQL error with YourPay gateway using old version of Zen Cart

mySQL error with YourPay gateway using old version of Zen Cart

Locked

Views: 1,657

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
9 May 2008, 7:18 PM
#1
apathy avatar

apathy

New Zenner

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

mySQL error with YourPay gateway using old version of Zen Cart

I installed my yourPay gateway, made sure port 1129 was open, have cURL turned on, digital certificate, yada yada. When i go to "confirm the order" i get this error "1264 Out of range value adjusted for column 'lp_trans_num' at row 1
in:
[update orders set lp_trans_num ='' where orders_id = '8']" on this page /estore/index.php?main_page=checkout_process. If i use zencart's CC module the checkout completed page shows up fine, or if i use check or money order option it shows up fine. In the admin when i go to Customers -> linkpoint cc review, i am getting all the orders.

9 May 2008, 8:25 PM
#2
apathy avatar

apathy

New Zenner

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

Re: mySQL error with YourPay gateway using old version of Zen Cart

Can someone tell me if this a bug in the YourPay Zencart payment module as it looks like its trying to insert a string into lp_trans_num which is type int(11).

9 May 2008, 9:04 PM
#3
apathy avatar

apathy

New Zenner

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

Re: mySQL error with YourPay gateway using old version of Zen Cart

BTW i am in testing mode..... help!!

9 May 2008, 9:16 PM
#4
apathy avatar

apathy

New Zenner

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

Re: mySQL error with YourPay gateway using old version of Zen Cart

logging into linkpoint shows the transaction despite the error. i have researched this error and the module is trying to insert an empty string '' into an int column (lp_trans_num). can somebody technically please tell me whyyyyyyyyyyy. i don't want to edit the query because im afraid that this is not supposed to be an empty string and that i should be getting an "lp_trans_num" and im not yet my oders are going thru.... can someone tell me if nots normal or not that lp_trans_num in the orders table gets an empty string.

9 May 2008, 9:30 PM
#5
apathy avatar

apathy

New Zenner

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

Re: mySQL error with YourPay gateway using old version of Zen Cart

i tried putting the module in the admin into production live mode to see if i get a transaction num and i go this error: 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'] Now the transaction number is too big!!! its either nothing or too big, what the heck is going on with this module? Does it not function correctly?

9 May 2008, 10:17 PM
#6
apathy avatar

apathy

New Zenner

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

Re: mySQL error with YourPay gateway using old version of Zen Cart

Can someone please tell me if the built in LinkPoint module for Zencart V1.3.7.1 has bugs in the scripts? 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.

9 May 2008, 11:36 PM
#7
apathy avatar

apathy

New Zenner

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

Re: mySQL error with YourPay gateway using old version of Zen Cart

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, 3:27 AM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: mySQL error with YourPay gateway using old version of Zen Cart

This has already been done in v1.3.8.x ... just REMOVE and INSTALL and then configure the module for the update ...

Thakns! :smile:

10 May 2008, 3:30 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: mySQL error with YourPay gateway using old version of Zen Cart

Try changing the database orders table to:
lp_trans_num varchar(64) NOT NULL DEFAULT