Results 1 to 10 of 10
  1. #1
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Undefined index and undefined variable errors in paypalwpp

    Ever since January 3, 2022, every PayPal Express Checkout order has triggered the following errors:
    • Undefined index: PAYMENTREQUEST_0_ADDRESSSTATUS in line 1847 of paypalwpp.php
    • Undefined variable: country_code3 in paypalwpp.php lines 1983, 1997, and 2010
    • Undefined index: countries_id in paypalwpp lines 2022 and 2075

    A PayPal EC on January 2 did not trigger these notices. All orders were for virtual products. I transitioned to zc157c on the production server on January 1. Has anyone else experienced these errors, especially this year?

    php 7.3.27

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Undefined index and undefined variable errors in paypalwpp

    Was this transition to 1.5.7, 1.5.7c, or to the latest of the v157 branch in Github?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Undefined index and undefined variable errors in paypalwpp

    Quote Originally Posted by mc12345678 View Post
    Was this transition to 1.5.7, 1.5.7c, or to the latest of the v157 branch in Github?
    The version is 1.5.7c.

  4. #4
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Undefined index and undefined variable errors in paypalwpp

    I should have provided the PayPal settings. Here they are:
    • Enable this payment module - true
    • Sort order of display - 5
    • Payment Zone - none
    • Express Checkout Shortcut Button - on
    • Set Order Status - Processing
    • Set Unpaid Order Status - Pending
    • Set Refund Order Status - Pending
    • Express Checkout: Require Confirmed Address - no
    • Express Checkout: Select Cheapest Shipping Automatically - Yes
    • Express Checkout: Skip Payment Page - yes
    • Express Checkout: Automatic Account Creation - Yes
    • Payment Action - Final Sale
    • Transaction Currency - Selected Currency
    • Store (Brand) Name at PayPal - [nothing entered]
    • Allow eCheck? - Instant Only
    • Fraud Magmt Filters - FMF - No
    • PayPal Page Style - Primary
    • PayPal Mode - payPal
    • Use InContext Checkout? - InContext
    • Live or Sandbox - live
    • Debug Mode - Log File

  5. #5
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Undefined index and undefined variable errors in paypalwpp

    I forgot to add one other undefined variable notice to the list in my first post in this thread: address_book_id on line 2075 in paypalwpp.php

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Undefined index and undefined variable errors in paypalwpp

    Initial review of code related to the above batista indicates that these issues may be previously unreported and seem to be yet unresolved. When say virtual product, could you 1, identify the product settings in the virtual section, the address required section and settings in that vicinity and 2, explain what makes this a virtual product and not simply a download?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Undefined index and undefined variable errors in paypalwpp

    The products are a membership (new or renewal) to our organization, and donation to the organization. The store does not ship or download anything to the customer for these two products. "Product is Virtual" is set to "yes". "Always free Shipping" for one product is set to "yes", the other is set to "no". I suppose both products should be set to "yes". The error appears for both products.

    Additional info: I have reported this problem on Zen Cart Github as issue #4528. A possible fix that works for me is posted there, as well as other settings. Checkout is through the normal route, selecting PayPal on the payment method selection page. I do not display the PayPal express button.

  8. #8
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Undefined index and undefined variable errors in paypalwpp

    I believe my statement made in the opening post that the error appeared suddenly after Jan 2 is in error. Examination of the logs for the PayPal transactions on Jan 2 and Jan 3 are identical for variables relevant to this issue. I can not explain the absence of the myDEBUG message for Jan 2. Maybe I deleted it.

    I tested a PayPal transaction with version 1.5.5f on my development system and got the same errors (along with a bunch of others). I rarely test PayPal transactions on the development system and error logging was turned off in the v1.5.5f production system prior to Jan 1, but turned on in the production v1.5.7c system after Jan 1.

  9. #9
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Undefined index and undefined variable errors in paypalwpp

    Quote Originally Posted by mc12345678 View Post
    Initial review of code related to the above batista indicates that these issues may be previously unreported and seem to be yet unresolved. When say virtual product, could you 1, identify the product settings in the virtual section, the address required section and settings in that vicinity and 2, explain what makes this a virtual product and not simply a download?
    Quote Originally Posted by Dave224 View Post
    The products are a membership (new or renewal) to our organization, and donation to the organization. The store does not ship or download anything to the customer for these two products. "Product is Virtual" is set to "yes". "Always free Shipping" for one product is set to "yes", the other is set to "no". I suppose both products should be set to "yes". The error appears for both products.

    Additional info: I have reported this problem on Zen Cart Github as issue #4528. A possible fix that works for me is posted there, as well as other settings. Checkout is through the normal route, selecting PayPal on the payment method selection page. I do not display the PayPal express button.
    Thanks for that additional information (especially for those that come across this thread). That said, the information of item 2 above does not appear to be provided. What is it about this product that necessitates it being marked as virtual? Are these downloadable product or is the product something like a subscription to a service? (FYI, knowing this may not directly resolve nor help resolve this specific issue, but incorrectly setting these product may cause other issues.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Jun 2012
    Posts
    412
    Plugin Contributions
    0

    Default Re: Undefined index and undefined variable errors in paypalwpp

    Quote Originally Posted by mc12345678 View Post
    Thanks for that additional information (especially for those that come across this thread). That said, the information of item 2 above does not appear to be provided. What is it about this product that necessitates it being marked as virtual? Are these downloadable product or is the product something like a subscription to a service? (FYI, knowing this may not directly resolve nor help resolve this specific issue, but incorrectly setting these product may cause other issues.)
    Nothing is shipped or downloaded to the customer for these products. One is to collect the annual fee for membership in our organization. The store sends order information for the membership product to the organization's membership office. The other product is to collect donations made to the organization. Again, order information is sent to the organization's fundraising treasurer. The customer gets the usual order confirmation and order status update emails from the store. If I set the product to not virtual, the customer will be forced to go through the shipping page if the only product in the order is a membership or donation (or both). And I would prefer the customers not have to do that. Are you saying the settings are not correct for these two products?

 

 

Similar Threads

  1. v156 Undefined variable: errorHeadingFlag
    By PanZC2020 in forum Bug Reports
    Replies: 1
    Last Post: 30 Jan 2019, 04:47 PM
  2. v151 db Execute issue -- Undefined variable: $db
    By tmpinsnty in forum General Questions
    Replies: 14
    Last Post: 25 Apr 2018, 07:57 PM
  3. v154 Call to undefined method currencies::get_decimal_places() in paypalwpp.php line 1055
    By Kenton in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 12 Apr 2016, 07:04 AM
  4. v154 Tax Variable Undefined In GV Module
    By PaulRRogers in forum Bug Reports
    Replies: 0
    Last Post: 4 Mar 2015, 10:16 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