Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    329
    Plugin Contributions
    0

    Default PHP Fatal error: Undefined constant MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY

    Zencart 1.5.8a - PHP 8.2 - No Plugins - Fresh install w/upgraded DB

    Hello, I am getting this error with a fresh install and upgraded database.

    Code:
    PHP Fatal error: Uncaught Error: Undefined constant "MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY"
    
    /home/dev/public_html/includes/modules/payment/paypaldp.php:264
    Because of the error the payment modules page only loads halfway, stops right after Paypal Payments Standard. It also affects the orders-edit page with just a white screen.

    Any seen this before?

    Thanks

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,036
    Plugin Contributions
    61

    Default Re: PHP Fatal error: Undefined constant MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY

    Quote Originally Posted by djdavedawson View Post
    Zencart 1.5.8a - PHP 8.2 - No Plugins - Fresh install w/upgraded DB

    Hello, I am getting this error with a fresh install and upgraded database.

    Code:
    PHP Fatal error: Uncaught Error: Undefined constant "MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY"
    
    /home/dev/public_html/includes/modules/payment/paypaldp.php:264
    Because of the error the payment modules page only loads halfway, stops right after Paypal Payments Standard. It also affects the orders-edit page with just a white screen.

    Any seen this before?

    Thanks
    Have you set your country in

    Configuration >> My Store > Country


    ~Melanie
    PRO-Webs, Inc. :: Recent Zen Cart Projects :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are NOT answered. You are welcome to contact us via our website for professional engagements.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,756
    Plugin Contributions
    124

    Default Re: PHP Fatal error: Undefined constant MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY

    Go to Admin > Modules > Payment and click on the PayPal you have installed. This will fix your installation.
    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.

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,576
    Plugin Contributions
    88

    Default Re: PHP Fatal error: Undefined constant MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY

    Quote Originally Posted by swguy View Post
    Go to Admin > Modules > Payment and click on the PayPal you have installed. This will fix your installation.
    Unfortunately, it won't. Apparently the previous database has paypaldp enabled, but that version didn't have the MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY setting defined.

    That setting's added in the module's check method, but the processing doesn't get that far due to the PHP Fatal error due to the constant not being defined.

    Noting that another issue is that the setting is either USA, UK or Canada, but various comparisons in the module check for US instead of USA.

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,756
    Plugin Contributions
    124

    Default Re: PHP Fatal error: Undefined constant MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY

    So uninstall/reinstall?
    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.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,576
    Plugin Contributions
    88

    Default Re: PHP Fatal error: Undefined constant MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY

    Quote Originally Posted by swguy View Post
    So uninstall/reinstall?
    And lose all the configuration setting from the previous install (that you can't view due to that fatal error)?

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,576
    Plugin Contributions
    88

    Default Re: PHP Fatal error: Undefined constant MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY

    Quote Originally Posted by lat9 View Post
    Unfortunately, it won't. Apparently the previous database has paypaldp enabled, but that version didn't have the MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY setting defined.

    That setting's added in the module's check method, but the processing doesn't get that far due to the PHP Fatal error due to the constant not being defined.

    Noting that another issue is that the setting is either USA, UK or Canada, but various comparisons in the module check for US instead of USA.
    Should line 264
    Code:
            if ( ((MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'US' || MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'Canada') && (MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '' || MODULE_PAYMENT_PAYPALWPP_APIUSERNAME == '' || MODULE_PAYMENT_PAYPALWPP_APIPASSWORD == ''))
    be
    Code:
            if ( ((MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'UK' || MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'Canada') && (MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '' || MODULE_PAYMENT_PAYPALWPP_APIUSERNAME == '' || MODULE_PAYMENT_PAYPALWPP_APIPASSWORD == ''))

  8. #8
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    329
    Plugin Contributions
    0

    Default Re: PHP Fatal error: Undefined constant MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY

    Ok so I tried updating line 264 like this.
    Code:
    if ( ((MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'USA' || MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY == 'Canada') && (MODULE_PAYMENT_PAYPALWPP_APISIGNATURE == '' || MODULE_PAYMENT_PAYPALWPP_APIUSERNAME == '' || MODULE_PAYMENT_PAYPALWPP_APIPASSWORD == ''))
    Unfortunately, this did not work for my case.

    However, I added this right above line 264

    HTML Code:
    define('MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY','US');
    This allowed the payment module page to load completely. Once loaded I

    *Took screen-shots of all the settings.
    *Clicked Remove Module
    *Clicked Install Module
    *Entered my settings
    *Then removed my define
    HTML Code:
    define('MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY','US');
    This process added the correct entries to the db.

    So far everything seems to be loading correctly.
    Last edited by djdavedawson; 18 Jan 2024 at 02:45 PM.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 24 Oct 2022, 10:00 PM
  2. v157 PHP Fatal error: Uncaught Error: Call to undefined function ctype_digit()
    By katrobb in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 30 Jun 2021, 02:23 AM
  3. v155 PHP Fatal error: Uncaught Error: Call to undefined function mysqli_close()
    By Brent in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 2 Apr 2018, 04:03 PM
  4. v155 PHP Fatal error: Call to undefined function cfg_select_option
    By JakeLawless in forum General Questions
    Replies: 2
    Last Post: 21 Mar 2018, 08:02 PM
  5. Replies: 4
    Last Post: 10 Jul 2012, 06:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR