Re: All Paypal/Payflow Modules are missing under ADMIN, Modules, Payment. - NEWBIE
OK, that has allowed me to use PHP v7.2 but now have another error in DEBUG:
[15-Jan-2019 02:40:05 Europe/London] Request URI: /shop/admin/modules.php?set=payment, IP address: 77.101.186.85
#1 payflow->payflow() called at [/home/sites/kentontrimmings.co.uk/public_html/shop/admin/modules.php:195]
--> PHP Warning: Use of undefined constant PEAR_LOG_INFO - assumed 'PEAR_LOG_INFO' (this will throw an Error in a future version of PHP) in /home/sites/kentontrimmings.co.uk/public_html/shop/includes/modules/payment/payflow.php on line 171.
modules.php:195
$module = new $class;
payflow.php:171
// Regular mode:
if ($this->enableDebugging) $this->_logLevel = PEAR_LOG_INFO;
Sorry, not a PHP programmer, so this is mainly gobbledegook to me :)
Re: All Paypal/Payflow Modules are missing under ADMIN, Modules, Payment. - NEWBIE
Quote:
Originally Posted by
jonoo62
OK, that has allowed me to use PHP v7.2 but now have another error in DEBUG:
[15-Jan-2019 02:40:05 Europe/London] Request URI: /shop/admin/modules.php?set=payment, IP address: 77.101.186.85
#1 payflow->payflow() called at [/home/sites/kentontrimmings.co.uk/public_html/shop/admin/modules.php:195]
--> PHP Warning: Use of undefined constant PEAR_LOG_INFO - assumed 'PEAR_LOG_INFO' (this will throw an Error in a future version of PHP) in /home/sites/kentontrimmings.co.uk/public_html/shop/includes/modules/payment/payflow.php on line 171.
modules.php:195
$module = new $class;
payflow.php:171
// Regular mode:
if ($this->enableDebugging) $this->_logLevel = PEAR_LOG_INFO;
Sorry, not a PHP programmer, so this is mainly gobbledegook to me :)
this is a warning, and should not hinder execution.
that said, the var PEAR_LOG_INFO is part of the pear package (https://pear.php.net) which i am unfamiliar with and i'm not sure why it would be required here.
perhaps someone else can chime in.
Re: All Paypal/Payflow Modules are missing under ADMIN, Modules, Payment. - NEWBIE
The Payflow contribution hasn't been updated in a while and needs some TLC.
Re: All Paypal/Payflow Modules are missing under ADMIN, Modules, Payment. - NEWBIE
Quote:
Originally Posted by
carlwhat
you could try changing the code to:
PHP Code:
// handle other order totals:
global ${$order_totals[$i]['code']};
if ((substr($order_totals[$i]['text'], 0, 1) == '-') || (isset(${$order_totals[$i]['code']}->credit_class) && ${$order_totals[$i]['code']}->credit_class == true)) {
THANK YOU!!! My website hosting company upgraded to php 7.2.17 last night, and today I woke up to find this exact problem - my paypal modules disappeared from the admin Payment Modules page (incomplete loading). And this was after I had already upgraded to 1.56a and tested the store a few weeks ago on a slightly earlier version of php 7.2. I had the same error:
Code:
PHP Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/xxxx/xxxx/public_html/shop/includes/modules/payment/payflow.php on line 1202.
The above fix worked perfectly. Thank you for giving me back my payment modules!
Re: All Paypal/Payflow Modules are missing under ADMIN, Modules, Payment. - NEWBIE
Would some nice person please update the plugin with these fixes?
https://www.zen-cart.com/downloads.php?do=file&id=212
Re: All Paypal/Payflow Modules are missing under ADMIN, Modules, Payment. - NEWBIE
Related to the PEAR_LOG_INFO warning:
I checked back into my older 1.38 store backup, and the file includes/modules/payment/paypal/paypal_curl.php contains these lines, among others:
PHP Code:
/**
* What level should we log at? Valid levels are:
* PEAR_LOG_ERR - Log only severe errors.
* PEAR_LOG_INFO - Date/time of operation, operation name, elapsed time, success or failure indication.
* PEAR_LOG_DEBUG - Full text of requests and responses and other debugging messages.
*
* @access protected
*
* @var integer $_logLevel
*/
var $_logLevel = PEAR_LOG_DEBUG;
The current version has this instead:
PHP Code:
/**
* What level should we log at? Valid levels are:
* 1 - Log only severe errors.
* 2 - Date/time of operation, operation name, elapsed time, success or failure indication.
* 3 - Full text of requests and responses and other debugging messages.
*
* @access protected
*
* @var integer $_logLevel
*/
var $_logLevel = 3;
Therefore, it seems that these were old constants that are no longer defined or used, and that the code in payflow.php at line 171 should be changed from:
PHP Code:
// Regular mode:
if ($this->enableDebugging) $this->_logLevel = PEAR_LOG_INFO;
// DEV MODE:
if (defined('PAYPAL_DEV_MODE') && PAYPAL_DEV_MODE == 'true') $this->_logLevel = PEAR_LOG_DEBUG;
To:
PHP Code:
// Regular mode:
if ($this->enableDebugging) $this->_logLevel = 2;
// DEV MODE:
if (defined('PAYPAL_DEV_MODE') && PAYPAL_DEV_MODE == 'true') $this->_logLevel = 3;
I will test this now....
Re: All Paypal/Payflow Modules are missing under ADMIN, Modules, Payment. - NEWBIE
I found one other undefined constant that was causing "Use of undefined constant PAYPAL_DEV_MODE" errors.
I have incorporated all the fixes into a new file, and tested it on 1.56a. No more issues that I can see.
I have uploaded the fixed files as a new version 1.5.6 on the https://www.zen-cart.com/downloads.php?do=file&id=212 page, but I do not see it showing up. Does it have to be approved or something?
Re: All Paypal/Payflow Modules are missing under ADMIN, Modules, Payment. - NEWBIE
Yes. I'll get it approved in a day or two. Thanks for doing this.