If this is your first visit, check our documentation. To post, register or login.

Syntax error?

Locked

Started by heresy_miniatures on 21 Mar 2019, 1:56 PM · Views: 9,832

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
21 Mar 2019, 1:56 PM
#1
heresy_miniatures avatar

heresy_miniatures

New Zenner

Join Date:
Jul 2011
Posts:
59
Plugin Contributions:
0

Post #1 by heresy_miniatures

[21-Mar-2019 13:06:04 Europe/London] Request URI: /shop/ipn_main_handler.php, IP address: 173.0.81.1
#1  require(/home/heresy/public_html/shop/includes/init_includes/init_database.php) called at [/home/heresy/public_html/shop/includes/autoload_func.php:48]
#2  require(/home/heresy/public_html/shop/includes/autoload_func.php) called at [/home/heresy/public_html/shop/includes/application_top.php:170]
#3  require(/home/heresy/public_html/shop/includes/application_top.php) called at [/home/heresy/public_html/shop/ipn_main_handler.php:114]
--> PHP Warning: Use of undefined constant USE_PCONNECT - assumed 'USE_PCONNECT' (this will throw an Error in a future version of PHP) in /home/heresy/public_html/shop/includes/init_includes/init_database.php on line 23.

[21-Mar-2019 13:06:04 Europe/London] Request URI: /shop/ipn_main_handler.php, IP address: 173.0.81.1
#1  ipn_postback() called at [/home/heresy/public_html/shop/ipn_main_handler.php:136]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPAL_HANDLER - assumed 'MODULE_PAYMENT_PAYPAL_HANDLER' (this will throw an Error in a future version of PHP) in /home/heresy/public_html/shop/includes/modules/payment/paypal/paypal_functions.php on line 442.

[21-Mar-2019 13:06:06 Europe/London] Request URI: /shop/ipn_main_handler.php, IP address: 173.0.81.1
#1  ipn_determine_txn_type() called at [/home/heresy/public_html/shop/ipn_main_handler.php:211]
--> PHP Warning: Use of undefined constant txn_type - assumed 'txn_type' (this will throw an Error in a future version of PHP) in /home/heresy/public_html/shop/includes/modules/payment/paypal/paypal_functions.php on line 220.

Getting these errors coming up with Paypal payment, do I need to go into the php and put ' ' around the bits going wrong in the code above? I did just upgrade from 1.5.4 and as far as I know i am using the latest Paypal module, the server php version was switched to 7.1, too.

21 Mar 2019, 4:17 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #2 by mc12345678

Appears that perhaps not all of the update has been applied or some other issue is at cause.

The first debug log entry seems to be occurring; however, is expected to be addressed in the load sequence several lines before reaching the point of attempting to initiate the database connection. There should be a line to define USE_PCONNECT if it is not defined.

The second debug log entry is related to a database constant that is expected to be present upon installation of the paypal module. (can be made available by removing and reinstalling the paypal module. Be sure to have your credentials before doing this). Though may not be an issue if the first is addressed.

The third, I haven't been able to easily locate where txn_type was used as a variable but without the dollar sign in front of it as the possible reason for that third entry, though resolution of the previous two may also correct this "issue".

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

21 Mar 2019, 4:48 PM
#3
lat9 avatar

lat9

Administrator

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

Post #3 by lat9

The third one's a bug in /shop/includes/modules/payments/paypal/paypal_functions.php (the first line shown is #220):

    if ($postArray['payment_status']=='Completed' && [B]txn_type[/B]=='express_checkout' && $postArray['payment_type']=='echeck') {
      $txn_type = 'express-checkout-cleared';
      return $txn_type;
    }

Changing txn_type to $txn_type will correct that issue.

22 Mar 2019, 12:38 AM
#5
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Post #5 by swguy

thanks Cindy.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.