If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / PayPal Express - fatal error

PayPal Express - fatal error

Started by balihr on 30 Aug 2024, 8:45 PM · Views: 1,219

Results 1 to 3 of 3
30 Aug 2024, 8:45 PM
#1
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,819
Plugin Contributions:
24

PayPal Express - fatal error

ZC 2.0.1
php 8.3

[30-Aug-2024 13:20:04 UTC] Request URI: /ipn_main_handler.php?type=ec&token=EC-XXXXXXXXXX577631T&PayerID=XXXXXXXXXXWTE, IP address: 172.XXX.XXX.XXX, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /home/XXXXXXX/public_html/includes/classes/db/mysql/query_factory.php(714): trigger_error()
#2 /home/XXXXXXX/public_html/includes/classes/db/mysql/query_factory.php(659): queryFactory->show_error()
#3 /home/XXXXXXX/public_html/includes/classes/db/mysql/query_factory.php(299): queryFactory->set_error()
#4 /home/XXXXXXX/public_html/includes/functions/database.php(134): queryFactory->Execute()
#5 /home/XXXXXXX/public_html/includes/modules/payment/paypalwpp.php(2266): zen_db_perform()
#6 /home/XXXXXXX/public_html/includes/modules/payment/paypalwpp.php(2010): paypalwpp->ec_step2_finish()
#7 /home/XXXXXXX/public_html/ipn_main_handler.php(85): paypalwpp->ec_step2()
--> PHP Fatal error: MySQL error 1364: Field 'registration_ip' doesn't have a default value :: INSERT INTO customers (customers_firstname, customers_lastname, customers_email_address, customers_email_format, customers_telephone, customers_fax, customers_gender, customers_newsletter, customers_password, customers_paypal_payerid) VALUES ('XXXXXX', 'XXXXXX', 'XXXXXX######################', 'HTML', '', '', '', '0', '$2y$10$1BQifrEBcXInWmwlLHs4Geuje.FkG22qNJBgkf1s31WFr7hHy4X3m', 'XXXXXXXXXXWTE') ==> (as called by) /home/XXXXXXX/public_html/includes/functions/database.php on line 134 <== in /home/XXXXXXX/public_html/includes/classes/db/mysql/query_factory.php on line 714.

Seems to be happening with all orders that go through PayPal Express checkout using the shortcut button on the shopping_cart page. Any ideas?

My site - Pro ZC Help
My portfolio | My plugins

30 Aug 2024, 8:52 PM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,819
Plugin Contributions:
24

Re: PayPal Express - fatal error

Ugh. Of course it took me a few hours of looking at it, posted the question and a minute after posting I figure it out...

The issue was the customers table was upgraded from an older version and the upgrade process doesn't automatically add 'registration_ip' so I added it manually, but set the default value of the field as "None" instead of "As defined:" and without a value... :frusty:

My site - Pro ZC Help
My portfolio | My plugins

30 Aug 2024, 11:08 PM
#3
swguy avatar

swguy

Administrator

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

Re: PayPal Express - fatal error

The upgrade process does automatically add registration_ip. See zc_install/sql/updates/mysql_upgrade_zencart_158.sql.

But it's possible that this operation failed if you have some custom dates in your customers table. See

https://docs.zen-cart.com/user/upgrading/unknown_column/

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.