Results 1 to 10 of 821

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    France
    Posts
    600
    Plugin Contributions
    8

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    I'm seeing the following error in the logs after an attempt to use Square.

    PHP Warning: Illegal string offset 'id' in /home/devsite/public_html/includes/modules/payment/square.php on line 142

    The module code hasn't been edited in any way.
    Site is a clean install of 1.5.5f
    Server is running PHP Version: 5.6.35 (Zend: 2.6.0). It was on PHP 7.1.12, but I switched to an older PHP version to see if it cleared the issue. No change.

    I checked the array key is wrapped in quotes, and it is.

    $sql = "SELECT zone_id FROM " . TABLE_ZONES_TO_GEO_ZONES . " WHERE geo_zone_id = '" . (int)MODULE_PAYMENT_SQUARE_ZONE . "' AND zone_country_id = '" . (int)$order->billing['country']['id'] . "' ORDER BY zone_id";

    Any suggestions?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,445
    Plugin Contributions
    81

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    Quote Originally Posted by strelitzia View Post
    I'm seeing the following error in the logs after an attempt to use Square.

    PHP Warning: Illegal string offset 'id' in /home/devsite/public_html/includes/modules/payment/square.php on line 142

    The module code hasn't been edited in any way.
    Site is a clean install of 1.5.5f
    Server is running PHP Version: 5.6.35 (Zend: 2.6.0). It was on PHP 7.1.12, but I switched to an older PHP version to see if it cleared the issue. No change.

    I checked the array key is wrapped in quotes, and it is.

    $sql = "SELECT zone_id FROM " . TABLE_ZONES_TO_GEO_ZONES . " WHERE geo_zone_id = '" . (int)MODULE_PAYMENT_SQUARE_ZONE . "' AND zone_country_id = '" . (int)$order->billing['country']['id'] . "' ORDER BY zone_id";

    Any suggestions?
    That's essentially saying that $order->billing['country']['id'] doesn't exist, which suggests that $order->billing['country'] isn't defined as an array ... which suggests something's amuck with the address, which suggests that either the customer is connected to an invalid address (ie: a prior address_book entry that no longer has a corresponding country record), or your order class isn't populating the country data properly when passing it to the module. You didn't say whether this was triggered by a customer purchase or if it was from an Admin attempt to look up an order paid by Square.
    Lots of moving parts.
    It's only a Warning, so isn't causing a fatal/crash (blank page) situation.

    Can you shed more light on the actual transaction and why the country data wouldn't be set properly when that Warning was generated?
    .

    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.

  3. #3
    Join Date
    Nov 2005
    Location
    France
    Posts
    600
    Plugin Contributions
    8

    Default Re: Square Payment Module for Zen Cart [Support Thread]

    Quote Originally Posted by DrByte View Post
    You didn't say whether this was triggered by a customer purchase or if it was from an Admin attempt to look up an order paid by Square.
    This error is being logged when viewing an order in admin.
    Address and country details all appear to be correct.

 

 

Similar Threads

  1. WordPress® for Zen Cart® (wp4zen) [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 109
    Last Post: 1 Dec 2024, 01:36 PM
  2. Bambora/Beanstream Payment Module Support Thread
    By swguy in forum Addon Payment Modules
    Replies: 127
    Last Post: 26 Mar 2021, 04:13 PM
  3. v154 Support Thread: AddToAny for Zen Cart (The Universal Sharing Platform)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 8 Apr 2019, 02:39 PM
  4. Layaway Payment Module Support Thread
    By Danielle in forum Addon Payment Modules
    Replies: 0
    Last Post: 21 Nov 2006, 06:43 AM

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