Page 1 of 2 12 LastLast
Results 1 to 10 of 821

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

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

    Quote Originally Posted by ianhg View Post
    How do I resolve the following PHP Warning with Square?
    [04-Feb-2020 13:26:21 UTC] Request URI: /index.php?main_page=checkout_process, IP address: 0000000
    #1 square->before_process() called at [/var/www/vhosts/domain/httpdocs/includes/classes/payment.php:246]
    #2 payment->before_process() called at [/var/www/vhosts/domain/httpdocs/includes/modules/checkout_process.php:92]
    #3 require(/var/www/vhosts/domain/httpdocs/includes/modules/checkout_process.php) called at [/var/www/vhosts/domain/httpdocs/includes/modules/pages/checkout_process/header_php.php:14]
    #4 require(/var/www/vhosts/domain/httpdocs/includes/modules/pages/checkout_process/header_php.php) called at [/var/www/vhosts/domain/httpdocs/index.php:36]
    --> PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/domain/httpdocs/includes/modules/payment/square.php on line 355.
    For this specific instance, you can change line 355 of the square.php module from
    Code:
    if (count($errors_object)) {
    to
    Code:
    if (!empty($errors_object)) {
    .

    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.

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

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

    BETA TESTING INVITATION

    I've recently worked on an update to the Square module, aiming to call it v1.0, to integrate their 2020-01-22 SDK code, which reduces some of the complexity in the module, embraces some of Square's newer API code, and prepares the way to integrate even more of their capabilities in the future.

    I've done a bunch of testing and it seems to work fine, but I'd like to get some feedback from people running live stores. Especially non-US stores (although US stores are needed too).

    I've attached the zip of the v1.00-beta.
    (beta zip removed, because v1.0 has now been released, and has includes several newer updates since the 1.00-beta was posted)

    Upgrade instructions:
    - Delete the server's /includes/classes/vendors/square directory and the /includes/modules/payment/square_support directory (You will replace these in a moment, but this deletes older obsolete files first).
    - Then upload all the files from the files_to_upload directory, putting them into the same directory on the server as you find them in this zip.
    Last edited by DrByte; 15 Mar 2020 at 05:10 PM. Reason: beta removed - see official release
    .

    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
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

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

    Haven't installed square in a very long time but new client website now needing it. php 7.1, zc 1.5.5f, square version .97

    New square account. The issue may be that I'm just missing something at square. I was able to retrieve everything to put in admin but it insists no access token. I did put in the Redirect URL at square but it states completely for everything that it is sandbox credentials. I see no way to reset if it's needed for a live site. If I click to authorize, it says "Client requires a Redirect URL to use OAuth"

    What am I missing here?
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  4. #4
    Join Date
    Oct 2005
    Location
    Hampshire, UK
    Posts
    96
    Plugin Contributions
    0

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

    I've just installed Square to hopefully replace Paypal. Zen Cart v 1.5.5.e, php v5.6 using Westminster_New template from Picaflor Azul. Website is in the UK. Configuration was fine.
    I tried adding something to my basket and clicked to checkout and noticed that the fields for the credit card information was 'greyed out' so I couldn't type it in.

    Using Chrome Developer Tools, under Console, I noticed this error:

    Uncaught ReferenceError: jQuery is https://www.qbis.co.uk/min/?f=/inclu...&1572439093:21
    not defined at https://www.qbis.co.uk/min/?f=/inclu...&1572439093:21

    What does that mean? Both links are the same.

    I've tried changing permissions on my config files from 444 to 644, copied over jscript_jquery.easing.1.3.js from gsgd.co.uk.

    I've tried searching on the forums but no joy. Any advice would be much appreciated.

  5. #5
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

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

    This is at the limit of my expertise but looking at the Network tab in dev tools (firefox) I think you might have two copies of jquery loaded.

    one from your template folder:

    /includes/templates/westminster_new/jscript/jquery/jquery-1.10.2.min.js

    and another loaded from your html_header.php:

    Code:
    <script type="text/javascript">
    if (typeof jQuery == 'undefined') {
        document.write(unescape("%3Cscript src='//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
    }
    </script>
    If I was debugging this I would remove one of the jquery instances and also turn off CSS/JS Loader.

    Beyond that I would probably be stuck.
    Simon

  6. #6
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

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

    The issue at square is that they now setup only the sandbox first. In order for the site to go live, go to Oauth page, look to bottom left - button needs to be turned on. I found out through sheer serendipity while talking with a support person (not square) he got another phone call and she had had the issue so the info I got while he had two phones to his ears! No help from square at all.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  7. #7
    Join Date
    Oct 2005
    Location
    Hampshire, UK
    Posts
    96
    Plugin Contributions
    0

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

    Thanks for your reply Simon. I'm really not technical so when you say remove one of the jquery instances you mean delete one of the files right? I've removed /includes/templates/westminster_new/jscript/jquery/jquery-1.10.2.min.js

    Under CSS/JS Loader Configuration, I put the values of Minify CSS and Javascript to False.

    It hasn't seem to have made any difference as I still can't input any data into the credit card fields.

    Site is https://bit.ly/2HdFdVO if anyone wanted to have a look

    I'm stuck!

  8. #8
    Join Date
    Oct 2005
    Location
    Hampshire, UK
    Posts
    96
    Plugin Contributions
    0

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

    I've just found out today from Square that they do not offer seller protection in the UK. I know they do in the US. As we have recently had a chargeback of over £800 through fraudulent credit card use on our website, this unfortunately would stop us from using Square I was told there is no 3D secure on Square.

  9. #9
    Join Date
    Oct 2005
    Location
    Hampshire, UK
    Posts
    96
    Plugin Contributions
    0

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

    I had that happen to me as well. My redirect URL was definitely in at Square Developer Portal. I tried using both live and sandbox access tokes to see if there was a difference but was getting "Client requires a Redirect URL to use OAuth" too.

    In the end, what worked for me (if I remember correctly as it was late last night) was to use the live access token.
    1. From Zen Cart admin, Modules-Payment-Square, click on 'Log In To Your Square Account' and log on
    2. From Square Dashboard, on the left column, select 'Apps'
    3. My Apps - Manage App
    4. On left column select OAuth. Check that Redirect URL https://www.your_website/square_handler.php is there
    5. Show Application Secret and copy and paste this into Zen Cart and update

    Fingers and toes crossed!

  10. #10
    Join Date
    Mar 2016
    Location
    Norcatur, Kansas, USA
    Posts
    80
    Plugin Contributions
    3

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

    Quote Originally Posted by nipinuk View Post
    I had that happen to me as well. My redirect URL was definitely in at Square Developer Portal. I tried using both live and sandbox access tokes to see if there was a difference but was getting "Client requires a Redirect URL to use OAuth" too.

    In the end, what worked for me (if I remember correctly as it was late last night) was to use the live access token.
    1. From Zen Cart admin, Modules-Payment-Square, click on 'Log In To Your Square Account' and log on
    2. From Square Dashboard, on the left column, select 'Apps'
    3. My Apps - Manage App
    4. On left column select OAuth. Check that Redirect URL https://www.your_website/square_handler.php is there
    5. Show Application Secret and copy and paste this into Zen Cart and update

    Fingers and toes crossed!
    I'm having the same problem. I traced it in my logs to the following error thrown by \includes\functions\plugin_support.php on line 70:

    Code:
    [20-Feb-2020 11:28:32 America/Chicago] PHP Warning:  file_get_contents(https://plugins.zen-cart.com/versioncheck/156): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request
    
     in \www\store\includes\functions\plugin_support.php on line 70

 

 
Page 1 of 2 12 LastLast

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