Forums / PayPal RESTful support / PayPal RESTful API Payment Module

PayPal RESTful API Payment Module

Views: 84,744

Results 441 to 460 of 491
2 Jun 2026, 11:05 AM
#441
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

PayPal RESTful API Payment Module

I am receiving errors regularly for paypal restful (encapsualted version). Your help to resolve them would be very much appreciated. I am using :
ZC 2.2.2 (fresh install)
Bootstrap 3.7.10 template
PHP 8.2.31
MySQL 10.3.39-MariaDB
Paypal Express Checkout is set to 'retired' although I had the same problems when this was not installed
Various other plugins installed inc Ceon URI mapping and Royal Mail
A typical example of the errors:-

[02-Jun-2026 08:20:43 UTC] Request URI: /ipn_main_handler.php, IP address: 173.0.81.140, Language id 1
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(352): zen_debug_error_handler()
--> PHP Warning: Undefined array key "payment" in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php on line 352.

[02-Jun-2026 08:20:43 UTC] PHP Fatal error:  Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php:214
Stack trace:
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/includes/classes/payment.php(121): paypalr->__construct()
#1 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(352): payment->__construct()
#2 {main}
  thrown in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php on line 214

[02-Jun-2026 08:20:43 UTC] Request URI: /ipn_main_handler.php, IP address: 173.0.81.140
--> PHP Fatal error: Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php:214
Stack trace:
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/includes/classes/payment.php(121): paypalr->__construct()
#1 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(352): payment->__construct()
#2 {main}
  thrown in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php on line 214.

[02-Jun-2026 08:20:43 UTC] Request URI: /ipn_main_handler.php, IP address: 173.0.81.140
--> PHP Fatal error: Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php:214
Stack trace:
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/includes/classes/payment.php(121): paypalr->__construct()
#1 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(352): payment->__construct()
#2 {main}
  thrown in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php on line 214.
2 Jun 2026, 11:51 AM
#442
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

@cheddars, were you doing any cleanup on the older PayPal transactions in the admin at the time of the errors? The issue lies with the paypalwpp/paypaldp's ipn_main_handler.php and I'm just trying to figure out how its being called to provide the "right" correction.

2 Jun 2026, 12:14 PM
#444
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

@lat9 thank you for responding so quickly.
I have not made any changes to PHP files although I have copied over database tables from a previous ZC 156 system (paypal and paypal_payment_status_history and orders).
The errors are generated on a regular basis (presumably during normal customer operations). I have not made any admin changes recently.

2 Jun 2026, 4:24 PM
#445
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PayPal RESTful API Payment Module

@cheddars,
Do you have the ExpressCheckout or DirectPayment modules "enabled" (or even set to "retired") instead of clicking Uninstall/Remove to completely deactivate them?
If you've "recently" (last 60 days) done transactions in the older PayPal modules and want to be able to inspect PayPal details via your store, you'd need it left set to "Retired".
But if none of your payment/order history with those modules is within the last 60 days, you wouldn't need to keep the old module enabled/retired at all, and can click Remove/Uninstall. And then the ipn_main_handler shouldn't fire either.

So, I'm just inquiring the state of your historical orders: will you need to review PayPal details on "recent" orders via your store's Admin? If not, you can remove those old PayPal modules. You can still explore actual transaction details and even do refunds on them directly from your PayPal account even if the old module is removed from your store.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Jun 2026, 4:48 PM
#446
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

Thank you @DrByte
Currently I have Paypal Express checkout set to 'retired' and I do have transactions within the last month. However there are not too many of them and so removing the module should not be a problem if I need to make a refund.
I shall uninstall Paypal Express and see how it goes

3 Jun 2026, 8:05 AM
#447
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

@DrByte,
After uninstalling Paypal Express I am still receiving the errors :-

[02-Jun-2026 20:54:26 UTC] Request URI: /ipn_main_handler.php, IP address: 66.211.170.66, Language id 1
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(352): zen_debug_error_handler()
--> PHP Warning: Undefined array key "payment" in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php on line 352.

[02-Jun-2026 20:54:26 UTC] PHP Fatal error:  Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php:214
Stack trace:
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/includes/classes/payment.php(121): paypalr->__construct()
#1 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(352): payment->__construct()
#2 {main}
  thrown in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php on line 214

[02-Jun-2026 20:54:26 UTC] Request URI: /ipn_main_handler.php, IP address: 66.211.170.66
--> PHP Fatal error: Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php:214
Stack trace:
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/includes/classes/payment.php(121): paypalr->__construct()
#1 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(352): payment->__construct()
#2 {main}
  thrown in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php on line 214.

[02-Jun-2026 20:54:26 UTC] Request URI: /ipn_main_handler.php, IP address: 66.211.170.66
--> PHP Fatal error: Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php:214
Stack trace:
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/includes/classes/payment.php(121): paypalr->__construct()
#1 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(352): payment->__construct()
#2 {main}
  thrown in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/zc_plugins/PayPalRestful/v2.0.0/catalog/includes/modules/payment/paypalr.php on line 214.
3 Jun 2026, 8:08 AM
#448
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

After uninstalling Paypal Express I still get the same error message logged

3 Jun 2026, 9:41 AM
#449
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

cheddars:

After uninstalling Paypal Express I still get the same error message logged
I should add, this was after applying the temporary fix suggested by @lat9
I have now captured 2 payments and received the following warnings :-

[03-Jun-2026 09:25:57 UTC] Request URI: /ipn_main_handler.php, IP address: 173.0.81.140, Language id 1
#0 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/includes/modules/payment/paypal/paypal_functions.php(402): zen_debug_error_handler()
#1 /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/ipn_main_handler.php(496): ipn_create_order_update_array()
--> PHP Warning: Undefined array key "pending_reason" in /var/www/vhosts/xxxxxxxxx.co.uk/httpdocs/includes/modules/payment/paypal/paypal_functions.php on line 402.
15 Jun 2026, 12:58 PM
#450
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

v1.3.2 of the non-encapsulated version of the PayPal RESTful payment module is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2382

This release contains changes associated with these GitHub issues:

#114: Sync with changes from the encapsulated version of the payment module.
#116: zcDate not loaded during webhook actions
#118: Wrong amount shown for PayLater messaging
#119: CC obfuscation modified for BIN lookups

20 Jun 2026, 10:26 AM
#451
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

v2.1.0 of the encapsulated version of the PayPal RESTful payment module is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2434

This release contains changes associated with these GitHub issues: https://github.com/zencart/paypalr/issues?q=is%3Aissue%20milestone%3Av2.1.0
Highlights:

  • Adds support for zc300's zen_config function (with polyfill for previous Zen Cart versions)
  • Corrects incorrect amounts for PayLater messaging on product pages.
  • Modifies the credit-card obfuscation to account for BIN lookups
  • Correction of various PHP logs and "hardening" of external input entries.
21 Jun 2026, 1:00 AM
#452
siliconbug avatar

siliconbug

Zen Follower

Join Date:
Apr 2009
Posts:
125
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

New error after upgrading to v1.3.2, but the transaction is successful:

ZC 1.58 w/ php 8.2

[19-Jun-2026 18:11:12 Canada/Pacific] PHP Fatal error:  Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /zc158/includes/modules/payment/paypalr.php:204
Stack trace:
#0 /zc158/includes/classes/payment.php(102): paypalr->__construct()
#1 /zc158/ipn_main_handler.php(320): payment->__construct('')
#2 {main}
  thrown in /zc158/includes/modules/payment/paypalr.php on line 204

[19-Jun-2026 18:11:12 Canada/Pacific] Request URI: /ipn_main_handler.php, IP address: 173.0.81.140
--> PHP Fatal error: Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /zc158/includes/modules/payment/paypalr.php:204
Stack trace:
#0 /zc158/includes/classes/payment.php(102): paypalr->__construct()
#1 /zc158/ipn_main_handler.php(320): payment->__construct('')
#2 {main}
  thrown in /zc158/includes/modules/payment/paypalr.php on line 204.
21 Jun 2026, 10:40 AM
#453
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

siliconbug:

New error after upgrading to v1.3.2, but the transaction is successful:

ZC 1.58 w/ php 8.2

[19-Jun-2026 18:11:12 Canada/Pacific] PHP Fatal error: Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /zc158/includes/modules/payment/paypalr.php:204
Stack trace:
#0 /zc158/includes/classes/payment.php(102): paypalr->__construct()
#1 /zc158/ipn_main_handler.php(320): payment->__construct('')
#2 {main}
thrown in /zc158/includes/modules/payment/paypalr.php on line 204

[19-Jun-2026 18:11:12 Canada/Pacific] Request URI: /ipn_main_handler.php, IP address: 173.0.81.140
--> PHP Fatal error: Uncaught Error: Class "PayPalRestful\Common\ErrorInfo" not found in /zc158/includes/modules/payment/paypalr.php:204
Stack trace:
#0 /zc158/includes/classes/payment.php(102): paypalr->__construct()
#1 /zc158/ipn_main_handler.php(320): payment->__construct('')
#2 {main}
thrown in /zc158/includes/modules/payment/paypalr.php on line 204.

This is a known issue with the /ipn_main_handler.php: <https://github.com/zencart/zencart/issues/7767>

It'll be partially corrected in zc223 and later (including zc300).  For earlier installations, you can start by making the change to add observer initialization to the paypal_ipn startup: <https://github.com/zencart/zencart/pull/7843/changes>
22 Jun 2026, 3:07 PM
#454
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

I have upgraded to Restful 2.10 using ZC 2.2.1 and PHP 8.2
I cannot access the Payments page in admin and an Error 500 is produced (doesn't seem to like 'sniffer'). Here are the logs :-

[22-Jun-2026 14:45:53 UTC] PHP Fatal error: Uncaught Error: Call to undefined method sniffer::index_exists() in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php:497
Stack trace:
#0 /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php(249): paypalr->tableCheckup()
#1 /admin/modules.php(187): paypalr->__construct()
#2 /admin/index.php(16): require('...')
#3 {main}
thrown in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php on line 497

[22-Jun-2026 14:45:53 UTC] Request URI: /admin/index.php?cmd=modules&set=payment, IP address: 81.104.105.33
--> PHP Fatal error: Uncaught Error: Call to undefined method sniffer::index_exists() in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php:497
Stack trace:
#0 /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php(249): paypalr->tableCheckup()
#1 /admin/modules.php(187): paypalr->__construct()
#2 /admin/index.php(16): require('...')
#3 {main}
thrown in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php on line 497.

[22-Jun-2026 14:45:53 UTC] Request URI: /admin/index.php?cmd=modules&set=payment, IP address: 81.104.105.33
--> PHP Fatal error: Uncaught Error: Call to undefined method sniffer::index_exists() in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php:497
Stack trace:
#0 /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php(249): paypalr->tableCheckup()
#1 /admin/modules.php(187): paypalr->__construct()
#2 /admin/index.php(16): require('...')
#3 {main}
thrown in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php on line 497.
23 Jun 2026, 1:45 AM
#455
carlwhat avatar

carlwhat

zennedOut

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

Re: PayPal RESTful API Payment Module

cheddars:

I have upgraded to Restful 2.10 using ZC 2.2.1 and PHP 8.2
I cannot access the Payments page in admin and an Error 500 is produced (doesn't seem to like 'sniffer'). Here are the logs :-

[22-Jun-2026 14:45:53 UTC] PHP Fatal error: Uncaught Error: Call to undefined method sniffer::index_exists() in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php:497
Stack trace:
#0 /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php(249): paypalr->tableCheckup()
#1 /admin/modules.php(187): paypalr->__construct()
#2 /admin/index.php(16): require('...')
#3 {main}
thrown in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php on line 497

[22-Jun-2026 14:45:53 UTC] Request URI: /admin/index.php?cmd=modules&set=payment, IP address: 81.104.105.33
--> PHP Fatal error: Uncaught Error: Call to undefined method sniffer::index_exists() in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php:497
Stack trace:
#0 /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php(249): paypalr->tableCheckup()
#1 /admin/modules.php(187): paypalr->__construct()
#2 /admin/index.php(16): require('...')
#3 {main}
thrown in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php on line 497.

[22-Jun-2026 14:45:53 UTC] Request URI: /admin/index.php?cmd=modules&set=payment, IP address: 81.104.105.33
--> PHP Fatal error: Uncaught Error: Call to undefined method sniffer::index_exists() in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php:497
Stack trace:
#0 /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php(249): paypalr->tableCheckup()
#1 /admin/modules.php(187): paypalr->__construct()
#2 /admin/index.php(16): require('...')
#3 {main}
thrown in /zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php on line 497.


go here:

/zc_plugins/PayPalRestful/v2.1.0/catalog/includes/modules/payment/paypalr.php on line 497.

and try changing:

```php
//from:
if (!$sniffer->index_exists(TABLE_PAYPAL_WEBHOOKS, 'idx_pprwebhook_unique')) {
//to:
if (!$sniffer->indexExists(TABLE_PAYPAL_WEBHOOKS, 'idx_pprwebhook_unique')) {

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.

23 Jun 2026, 8:45 AM
#456
cheddars avatar

cheddars

New Zenner

Join Date:
May 2006
Posts:
39
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

Thank you @carlwhat. Sniffer fix worked :smile:

23 Jun 2026, 11:13 AM
#457
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

v2.1.1 of PayPal RESTful (Encapsulated) is now available for download. That version corrects the "$sniffer" bug reported above.

Please use that version instead of v2.1.0. Thanks to @cheddars for the report and @carlwhat for the correction.

2 Jul 2026, 8:02 PM
#458
spminis avatar

spminis

Zen Follower

Join Date:
Feb 2015
Location:
USA
Posts:
194
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

I uploaded the files. Using ZC 2.1. The payment module isn't showing.
Any ideas?

Thanks

2 Jul 2026, 9:55 PM
#459
carlwhat avatar

carlwhat

zennedOut

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

Re: PayPal RESTful API Payment Module

spminis:

I uploaded the files. Using ZC 2.1. The payment module isn't showing.
Any ideas?

Thanks

if using the encapsulated version, did you go to:

admin -> modules -> plugin manager -> PayPal Restful Payment Module -> install

after that the module should be visible under payments.

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.

2 Jul 2026, 10:22 PM
#460
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

carlwhat:

if using the encapsulated version, did you go to:

admin -> modules -> plugin manager -> PayPal Restful Payment Module -> install

after that the module should be visible under payments.

best.
And if you did install the encapsulated version, please note that it's not supported by Zen Cart 2.1.0; for Zen Cart versions prior to 2.2.1, you need to install the non-encapsulated version.