Zen Cart Logo
Forums / Upgrading to 1.5.x / PayPal Pro not working in Zencart v1.5.7d with PHP 8.0.16

PayPal Pro not working in Zencart v1.5.7d with PHP 8.0.16

Views: 1,337

Results 1 to 2 of 2
11 Mar 2022, 4:26 AM
#1
ntestinfo11 avatar

ntestinfo11

New Zenner

Join Date:
Mar 2011
Posts:
39
Plugin Contributions:
0

PayPal Pro not working in Zencart v1.5.7d with PHP 8.0.16

I have fresh installed Zencart v1.5.7d

Template : Responsive Classic Template

PHP Version: 8.0.16 (Zend: 4.0.16)
Database Engine: MySQL 5.7.23-23

NO PLUGINS INSTALLED. ITS FRESH COPY OF ZENCART v.1.5.7d

PayPal express checkout is working fine on checkout page. But when using PayPal pro (Credit Card) the continue button is not working. You can check here.

https://dev1.nlinksolution.com/

Here is the error log.

[11-Mar-2022 04:17:58 UTC] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 117.228.34.21
#1 zcAjaxPayment->prepareConfirmation() called at [/home2/dev1nlinksolutio/public_html/ajax.php:85]
--> PHP Warning: Undefined array key "cc_id" in /home2/dev1nlinksolutio/public_html/includes/classes/ajax/zcAjaxPayment.php on line 130.

[11-Mar-2022 04:17:58 UTC] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 117.228.34.21
#1 zcAjaxPayment->prepareConfirmation() called at [/home2/dev1nlinksolutio/public_html/ajax.php:85]
--> PHP Warning: Undefined variable $paypaldp in /home2/dev1nlinksolutio/public_html/includes/classes/ajax/zcAjaxPayment.php on line 167.

[11-Mar-2022 04:17:58 UTC] PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /home2/dev1nlinksolutio/public_html/includes/classes/ajax/zcAjaxPayment.php:167
Stack trace:
#0 /home2/dev1nlinksolutio/public_html/includes/classes/ajax/zcAjaxPayment.php(167): method_exists(NULL, 'alterShippingEd...')
#1 /home2/dev1nlinksolutio/public_html/ajax.php(85): zcAjaxPayment->prepareConfirmation()
#2 {main}
thrown in /home2/dev1nlinksolutio/public_html/includes/classes/ajax/zcAjaxPayment.php on line 167

[11-Mar-2022 04:17:58 UTC] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 117.228.34.21
--> PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /home2/dev1nlinksolutio/public_html/includes/classes/ajax/zcAjaxPayment.php:167
Stack trace:
#0 /home2/dev1nlinksolutio/public_html/includes/classes/ajax/zcAjaxPayment.php(167): method_exists(NULL, 'alterShippingEd...')
#1 /home2/dev1nlinksolutio/public_html/ajax.php(85): zcAjaxPayment->prepareConfirmation()
#2 {main}
thrown in /home2/dev1nlinksolutio/public_html/includes/classes/ajax/zcAjaxPayment.php on line 167.

Looks like BUG in latest version.

I have checked this forum post
https://www.zen-cart.com/showthread.php?227850-What-I-learned-upgrading-to-157c-if-you-have-used-a-12leaves-template-read-this

But that patch is already applied in this version.

7 Apr 2022, 11:46 PM
#2
swguy avatar

swguy

Administrator

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

Re: PayPal Pro not working in Zencart v1.5.7d with PHP 8.0.16

Please try testing

is_object(${$_SESSION['payment']})

in the if block on line 167 includes/classes/ajax/zcAjaxPayment.php.

You might have to repeat on line 174.