Zen Cart Logo
Forums / Addon Payment Modules / Completion of transaction failing (attempting to post to absent table?)

Completion of transaction failing (attempting to post to absent table?)

Views: 2,883

Results 1 to 3 of 3
26 Nov 2019, 4:40 PM
#1
ventilator avatar

ventilator

New Zenner

Join Date:
Feb 2011
Posts:
16
Plugin Contributions:
0

Completion of transaction failing (attempting to post to absent table?)

josephharley.co.uk
recently upgraded from 1.3 something (by transferring to temp domain/space, upgrading, then transfer back)
Server OS: Linux 4.19.44
Server: ApachePHP Version: 7.2.11
Database Engine: MySQL 5.5.5-10.2.22-MariaDB-log

Hello! Using the (fairly ancient) securehosting_V3.php payment module. Payments now seem to be processing OK, but I hit a

"WARNING: An Error occurred, please refresh the page and try again."
error on (what I think is) completion.

Logs tell me:

[26-Nov-2019 16:17:55 Europe/London] Request URI: /index.php?main_page=checkout_process&transactionreference=128347351&transactiondate=2019-11-26&transactiontime=16:17:39&cv2avsresult=ALL%20MATCH, IP address: 89.34.99.134
#1 trigger_error() called at [/var/sites/j/josephharley.co.uk/public_html/includes/classes/db/mysql/query_factory.php:171]
#2 queryFactory->show_error() called at [/var/sites/j/josephharley.co.uk/public_html/includes/classes/db/mysql/query_factory.php:143]
#3 queryFactory->set_error() called at [/var/sites/j/josephharley.co.uk/public_html/includes/classes/db/mysql/query_factory.php:270]
#4 queryFactory->Execute() called at [/var/sites/j/josephharley.co.uk/public_html/includes/modules/payment/securehosting.php:157]
#5 securehosting->after_process() called at [/var/sites/j/josephharley.co.uk/public_html/includes/classes/payment.php:254]
#6 payment->after_process() called at [/var/sites/j/josephharley.co.uk/public_html/includes/modules/pages/checkout_process/header_php.php:17]
#7 require(/var/sites/j/josephharley.co.uk/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/var/sites/j/josephharley.co.uk/public_html/index.php:36]
--> PHP Fatal error: 1054:Unknown column 'zen_order_id' in 'field list' :: INSERT INTO paypal (zen_order_id,txn_id,payment_date,payer_id,reason_code) VALUES ('184','128347351','2019-11-26 16:17:39','ALL MATCH','Success') ==> (as called by) /var/sites/j/josephharley.co.uk/public_html/includes/modules/payment/securehosting.php on line 157 <== in /var/sites/j/josephharley.co.uk/public_html/includes/classes/db/mysql/query_factory.php on line 171.

I'm no database expert, but it looks as if the php is trying to write to a column ('zen_order_id') that no longer exists in the DB. Can someone who's familiar with old and new ZC database architecture tell me if I'm right - and even better, if I can afford to strip anything out from the payment side to prevent the error?

Many thanks

Ventilator

26 Nov 2019, 4:50 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,066
Plugin Contributions:
56

Re: Completion of transaction failing (attempting to post to absent table?)

As you surmised, there's no field in the **paypal **table named zen_order_id. You'll need to edit /var/sites/j/josephharley.co.uk/public_html/includes/modules/payment/securehosting.php, line 157, changing **zen_order_id **to order_id.

27 Nov 2019, 3:04 PM
#3
ventilator avatar

ventilator

New Zenner

Join Date:
Feb 2011
Posts:
16
Plugin Contributions:
0

Re: Completion of transaction failing (attempting to post to absent table?)

Yep, great - got it. Thanks!