Page 15 of 68 FirstFirst ... 513141516172565 ... LastLast
Results 141 to 150 of 671
  1. #141
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,699
    Plugin Contributions
    11

    Default Re: Square WebPay support thread.

    Quote Originally Posted by mvstudio View Post
    All the files were placed back as they were in the original installation 1.5.7.

    Just an observation that removing something implies taking away or out, rather than turning it off. That's where this error of mine came from.

    As far as I remember ZC has always had this constant that when one plugin is "removed", the files for that plugin can be safely deleted from the server, until now as far as I can tell. That's why I assumed I was doing the right thing by "removing the deprecated Square plugin" as there was no need for it. Nowhere in any of the files anywhere it stated I shouldn't have done so. Maybe a note in the read-me would help others not make the same error I made(?). Just a suggestion to avoid future mishaps.

    Honest mistake on my part. Didn't mean to cause any trouble nor offend anyone. All is well and everything works as it should.

    Thanks for the help! I really appreciate it
    i can only speak for myself, and i did not take any offense.

    with regards to removal of plugins, you are correct. but square is NOT a plugin. it is part of the base ZC install. square_webPay is a plugin.

    if you think the documentation at docs.zen-cart.com is wrong (or could be clarified), i would suggest you download hugo and fix them. i'm sure the next user would be most appreciative (as well as @swguy).

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  2. #142
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,740
    Plugin Contributions
    323

    Default Re: Square WebPay support thread.

    The help file has been updated to warn against deleting old Square implementation files.

    https://docs.zen-cart.com/user/payment/square/
    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.

  3. #143
    Join Date
    Aug 2009
    Posts
    45
    Plugin Contributions
    0

    Default Re: Square WebPay support thread.

    Hi guys. I just tried adding this plugin. I am using v1.5.7c and PHP 8.0.

    After uploading all the files, when I go to turn on the module and turn off the older Square module, the new one isn't showing. The page is breaking where the new module should be showing. My error log shows this:

    PHP Fatal error: Uncaught Error: Undefined constant "MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE" in .../store/includes/modules/payment/square_webPay.php:106

    If I switch to PHP 7.4, the module shows.

    I realise most people in this thread are using PHP 7.4, and therefore won't have this issue or maybe see it as a big deal, but I have everything else on my site working fine with PHP 8, so it would be nice to keep PHP 8 on, if this happens to be a quick easy fix. Any ideas?
    20th Century Glass - Antique & Collectable Glass Store

  4. #144
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,179
    Plugin Contributions
    11

    Default Re: Square WebPay support thread.

    I don't know if the same is true for your admin but, with the errors found on your home page, you may find that basic errors are creating problems for you.
    Code:
    <!--<div id="navMain">
    <ul class="back">
    <li></a></li>
    <li><a href=""></a></li>
    <li><a href=""></a></li>
    <li class="last"><a href=""></a></li>
    <li><a href=""></a></li>
    <li class="last"><a href=""></a></li>
    <li>
    <a class="navCartContentsIndicator" href=""><i class="fa fa-shopping-cart" title="Shopping Cart"></i>
    </a>
    </li>
    <li class="last"><a href=""></a></li>
    </ul>
    <div id="navMainSearch" class="forward">
    </div>
    </div>
    </div>
    <!--eof navigation display-->
    <!--bof header google ad display-->
    <!--eof header google ad display-->
    <!--bof branding display-->
    <!--bof-wstephens edit-->
    <!--<div id="logoWrapper" class="group onerow-fluid navbar-dark bg-dark">
    <div id="logo">
    <img id="bannerPic" src="https://www.20thcenturyglass.com/images/main/20th-century-glass-headbanner2018.jpg" alt="20th Century Glass" border="0" />
    </div>
    </div>
    <!--eof-wstephens edit-->
    <!--<div id="logoWrapper" class="group onerow-fluid">
    <div id="logo"> <div id="taglineWrapper">
    <div id="tagline"></div>
    <div id="bannerTwo" class="banners"></div>
    </div>
    </div>
    </div>
    You have several issues in items that may be on every page in your site. I've highlighted four instances of <!--. Between 1 to 2 and 3 to 4 there should be an ending -->
    Fixing basic CSS and HTML errors might make things run smoother
    Last edited by dbltoe; 8 Jun 2022 at 02:05 PM. Reason: added comment

  5. #145
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,740
    Plugin Contributions
    323

    Default Re: Square WebPay support thread.

    > PHP Fatal error: Uncaught Error: Undefined constant "MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE" in .../store/includes/modules/payment/square_webPay.php:106

    Right above line 105 add

    if (null === $this->sort_order) return;
    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. #146
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,699
    Plugin Contributions
    11

    Default Re: Square WebPay support thread.

    Quote Originally Posted by dbltoe View Post
    I don't know if the same is true for your admin but, with the errors found on your home page, you may find that basic errors are creating problems for you.
    ...
    Fixing basic CSS and HTML errors might make things run smoother
    noting that none of these fixes has absolutely anything to do with problem being reported. nor anything to do with square_webPay.

    please do NOT hijack this thread.

    Quote Originally Posted by swguy View Post
    > PHP Fatal error: Uncaught Error: Undefined constant "MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE" in .../store/includes/modules/payment/square_webPay.php:106

    Right above line 105 add

    if (null === $this->sort_order) return;
    @swguy, i am NOT a fan of this solution for so many reasons. lets start with this:

    https://www.php-fig.org/psr/psr-12/#51-if-elseif-else

    and then continue with what happens in the admin with the affiliate link? as well as other details?

    i will post some new code shortly.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #147
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,740
    Plugin Contributions
    323

    Default Re: Square WebPay support thread.

    This is the standard mechanism that modules use to avoid logs from undefined variables in recent versions of PHP. Compare any other payment module and you'll see this pattern.
    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.

  8. #148
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,699
    Plugin Contributions
    11

    Default Re: Square WebPay support thread.

    Quote Originally Posted by swguy View Post
    This is the standard mechanism that modules use to avoid logs from undefined variables in recent versions of PHP. Compare any other payment module and you'll see this pattern.
    i have no idea what standard mechanism means. and just because it was done that way does not make it right.

    i would suggest spending more time testing prior to posting code. your early return completely changes how square is presented to the store owner prior to install. and either we want our code to conform to PSR or we do not. i prefer my code to conform to said standards as i am a fan of the PHP Standards Recommendation (PSR).

    back to the problem at hand; here is the fix for said code. changes start at line 105.

    PHP Code:
    // from:

                
    $environment Environment::PRODUCTION;
                if (
    MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE === 'Sandbox') {
                    
    $environment Environment::SANDBOX;
                }

                
    $this->client = new SquareClient([
                    
    'accessToken' => MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN,
                    
    'environment' => $environment,
                ]);

    // to:
                
    $environment Environment::PRODUCTION;
                if (
    defined('MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE') && MODULE_PAYMENT_SQ_WEBPAY_TESTING_MODE === 'Sandbox') {
                    
    $environment Environment::SANDBOX;
                }

                
    $this->token'';
                if (
    defined('MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN')) {
                    
    $this->token MODULE_PAYMENT_SQ_WEBPAY_ACCESS_TOKEN;
                }

                
    $this->client = new SquareClient([
                    
    'accessToken' => $this->token,
                    
    'environment' => $environment,
                ]); 
    @WayneStephens please let me know if that works for you.

    also, noting that these errors exist and are logged in php 7.4; in php 8.0, they are now fatal errors.

    best.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  9. #149
    Join Date
    Aug 2009
    Posts
    45
    Plugin Contributions
    0

    Default Re: Square WebPay support thread.

    Quote Originally Posted by carlwhat View Post
    @WayneStephens please let me know if that works for you.
    That fixed it, thanks! And no other errors coming up so far while testing.
    20th Century Glass - Antique & Collectable Glass Store

  10. #150
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,699
    Plugin Contributions
    11

    Default Re: Square WebPay support thread.

    Quote Originally Posted by WayneStephens View Post
    That fixed it, thanks! And no other errors coming up so far while testing.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 15 of 68 FirstFirst ... 513141516172565 ... LastLast

Similar Threads

  1. Square Payment Module for Zen Cart [Support Thread]
    By DrByte in forum Addon Payment Modules
    Replies: 749
    Last Post: 5 Sep 2023, 01:16 AM
  2. Hebrew Support - latest release [Support Thread]
    By eranariel in forum Addon Language Packs
    Replies: 19
    Last Post: 23 Jan 2023, 08:04 AM
  3. Square Support for SqPaymentForm ending 15th July 2022
    By brittainmark in forum Addon Payment Modules
    Replies: 1
    Last Post: 9 Apr 2022, 02:40 PM
  4. v156 Square Payments and strange request from Square
    By ianhg in forum General Questions
    Replies: 4
    Last Post: 14 Nov 2020, 11:14 AM
  5. v156 PWA, Offline support Push notifications addon [Support Thread]
    By perfumbg in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 23 May 2019, 02:27 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