Forums / Built-in Shipping and Payment Modules / Paypal payments pro fatal error in zcAjaxPayment.php

Paypal payments pro fatal error in zcAjaxPayment.php

Views: 2,797

Results 1 to 6 of 6
28 Feb 2024, 9:17 PM
#1
vanhorn_s avatar

vanhorn_s

Zen Follower

Join Date:
Apr 2010
Posts:
283
Plugin Contributions:
0

Paypal payments pro fatal error in zcAjaxPayment.php

redsautorehab.com
1.5.8
PHP 8.0
I have not gotten a single order in several days, and had a customer call me to let me know that they can't pay. I verified that after entering the credit card info, and hitting the continue button, nothing happens at all, and I get a php fatal error with zcAjaxPayment.php. I checked on my host's website, and it looks like they forced me into php 8.0 recently with no way of going back to a lower version, so I need to figure out how to prevent this fatal error.

[28-Feb-2024 14:00:35 America/Boise] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 71.223.48.160
#1 zcAjaxPayment->prepareConfirmation() called at [/home1/redsauto/public_html/ajax.php:85]
--> PHP Warning: Undefined array key "cc_id" in /home1/redsauto/public_html/includes/classes/ajax/zcAjaxPayment.php on line 129.

[28-Feb-2024 14:00:35 America/Boise] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 71.223.48.160
#1 zcAjaxPayment->prepareConfirmation() called at [/home1/redsauto/public_html/ajax.php:85]
--> PHP Warning: Undefined variable $paypaldp in /home1/redsauto/public_html/includes/classes/ajax/zcAjaxPayment.php on line 166.

[28-Feb-2024 14:00:35 America/Boise] PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /home1/redsauto/public_html/includes/classes/ajax/zcAjaxPayment.php:166
Stack trace:
#0 /home1/redsauto/public_html/includes/classes/ajax/zcAjaxPayment.php(166): method_exists(NULL, 'alterShippingEd...')
#1 /home1/redsauto/public_html/ajax.php(85): zcAjaxPayment->prepareConfirmation()
#2 {main}
thrown in /home1/redsauto/public_html/includes/classes/ajax/zcAjaxPayment.php on line 166

[28-Feb-2024 14:00:35 America/Boise] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 71.223.48.160
--> PHP Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /home1/redsauto/public_html/includes/classes/ajax/zcAjaxPayment.php:166
Stack trace:
#0 /home1/redsauto/public_html/includes/classes/ajax/zcAjaxPayment.php(166): method_exists(NULL, 'alterShippingEd...')
#1 /home1/redsauto/public_html/ajax.php(85): zcAjaxPayment->prepareConfirmation()
#2 {main}
thrown in /home1/redsauto/public_html/includes/classes/ajax/zcAjaxPayment.php on line 166.

28 Feb 2024, 9:37 PM
#2
vanhorn_s avatar

vanhorn_s

Zen Follower

Join Date:
Apr 2010
Posts:
283
Plugin Contributions:
0

Re: Paypal payments pro fatal error in zcAjaxPayment.php

I was able to find a way of forcing the site back to php 7.4, but I would really like to get the files fixed, so that if I get forced into a newer php again, I won't lose functionality.

28 Feb 2024, 10:27 PM
#3
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: Paypal payments pro fatal error in zcAjaxPayment.php

vanhorn_s:

I was able to find a way of forcing the site back to php 7.4, but I would really like to get the files fixed, so that if I get forced into a newer php again, I won't lose functionality.

i am guessing that this file:

includes/classes/ajax/zcAjaxPayment.php

is missing this PR.

i would ensure that you are using this version of said file.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

29 Feb 2024, 1:46 AM
#4
vanhorn_s avatar

vanhorn_s

Zen Follower

Join Date:
Apr 2010
Posts:
283
Plugin Contributions:
0

Re: Paypal payments pro fatal error in zcAjaxPayment.php

Thank you. That fixed it, but now I have a whole bunch of Undefined array key warnings now, triggered by includes/modules/payment/paypaldp.php

29 Feb 2024, 10:48 AM
#5
swguy avatar

swguy

Administrator

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

Re: Paypal payments pro fatal error in zcAjaxPayment.php

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.

29 Feb 2024, 11:06 AM
#6
swguy avatar

swguy

Administrator

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

Re: Paypal payments pro fatal error in zcAjaxPayment.php

carlwhat:

i would ensure that you are using this version of said file.

Thanks for tracking this down @carlwhat.

@vanhorn_s: updated file noted above is one of the many fixes in Zen Cart 1.5.8a, the first patch release to 1.5.8. It's a good practice to update to the latest at your earliest opportunity.

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.