Re: Square Payment Module for Zen Cart [Support Thread]
Hello,
Thank you for this wonderful plugin. I have installed it and followed the instructions to the letter. I did a test purchase and it worked just fine with no errors given. The log folder was also error log free. What I have may not even be a real problem , but I just noticed something. When I login to my test buy customer account it shows 2 people logged in as a members. This can't be right since I am the only person logged in. Did i miss something during the install ? It shows up correctly in my payment options and works with the test sell.
Re: Square Payment Module for Zen Cart [Support Thread]
I tried again a few minutes ago and didn't get that message again. I still just get returned without a request to authorize from Square. Where should I look for log files that might shed some light on this?
Re: Square Payment Module for Zen Cart [Support Thread]
OK, I found what looks to be a logfile tied to the error. I've tweaked it just to hide the admin directory name. Looks like something to do with checking a version number?
[03-May-2018 20:40:54 America/Los_Angeles] Request URI: /shop/...../modules.php?set=payment&module=square, IP address: 71.95.106.83
#1 trigger_error() called at [C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php:68]
#2 plugin_version_check_for_updates() called at [C:\Web Files\localuser\CHCG\Shop\includes\modules\payment\square.php:87]
#3 square->__construct() called at [C:\Web Files\localuser\CHCG\Shop\.....\modules.php:185]
[03-May-2018 20:40:54 America/Los_Angeles] PHP Notice: CURL error checking plugin versions: 60:SSL certificate problem: self signed certificate in certificate chain
Trying file_get_contents() instead. in C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php on line 68
[03-May-2018 20:40:56 America/Los_Angeles] Request URI: /shop/...../modules.php?set=payment&module=square, IP address: 71.95.106.83
#1 file_get_contents() called at [C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php:70]
#2 plugin_version_check_for_updates() called at [C:\Web Files\localuser\CHCG\Shop\includes\modules\payment\square.php:87]
#3 square->__construct() called at [C:\Web Files\localuser\CHCG\Shop\.....\modules.php:185]
[03-May-2018 20:40:56 America/Los_Angeles] 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 C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php on line 70
[03-May-2018 20:40:56 America/Los_Angeles] Request URI: /shop/...../modules.php?set=payment&module=square, IP address: 71.95.106.83
#1 trigger_error() called at [C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php:72]
#2 plugin_version_check_for_updates() called at [C:\Web Files\localuser\CHCG\Shop\includes\modules\payment\square.php:87]
#3 square->__construct() called at [C:\Web Files\localuser\CHCG\Shop\.....\modules.php:185]
[03-May-2018 20:40:56 America/Los_Angeles] PHP Notice: file_get_contents() error checking plugin versions.
Trying http instead. in C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php on line 72
[03-May-2018 20:40:56 America/Los_Angeles] Request URI: /shop/...../modules.php?set=payment&module=square, IP address: 71.95.106.83
#1 file_get_contents() called at [C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php:73]
#2 plugin_version_check_for_updates() called at [C:\Web Files\localuser\CHCG\Shop\includes\modules\payment\square.php:87]
#3 square->__construct() called at [C:\Web Files\localuser\CHCG\Shop\.....\modules.php:185]
[03-May-2018 20:40:56 America/Los_Angeles] PHP Warning: file_get_contents(http://plugins.zen-cart.com/versioncheck/156): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
in C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php on line 73
[03-May-2018 20:40:56 America/Los_Angeles] Request URI: /shop/...../modules.php?set=payment&module=square, IP address: 71.95.106.83
#1 trigger_error() called at [C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php:76]
#2 plugin_version_check_for_updates() called at [C:\Web Files\localuser\CHCG\Shop\includes\modules\payment\square.php:87]
#3 square->__construct() called at [C:\Web Files\localuser\CHCG\Shop\.....\modules.php:185]
[03-May-2018 20:40:56 America/Los_Angeles] PHP Notice: file_get_contents() error checking plugin versions.
Aborting. in C:\Web Files\localuser\CHCG\Shop\includes\functions\plugin_support.php on line 76
Re: Square Payment Module for Zen Cart [Support Thread]
No other idea? Is there a different way to get Square support with Zen Cart? If not is there a suggestion for a replacement for Zen Cart that will work?
Re: Square Payment Module for Zen Cart [Support Thread]
This could be a problem...
Code:
60:SSL certificate problem: self signed certificate in certificate chain
Are you using a self signed certificate for your SSL?
Have you tried running your website thru https://www.ssllabs.com/ssltest/
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
billsey5
Aha, a clue perhaps... When I get sent back to Payment Modules I see:
ERROR: module not loaded due to missing language file: C:/Web Files/localuser/CHCG/Shop/includes/languages/english/modules/payment/square_handler.php
That would only appear if you put a file named square_handler.php into the /includes/modules/payment directory. The system looks for the module files, and their corresponding matching filename for language file. That error message means you've got a module file present without a matching language file.
And in this situation you should not have a "square_handler.php" file in the /includes/modules/payment directory. It belongs in the root directory of your shop.
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
jasonshanks
Hello,
Thank you for this wonderful plugin. I have installed it and followed the instructions to the letter. I did a test purchase and it worked just fine with no errors given. The log folder was also error log free.
What I have may not even be a real problem , but I just noticed something. When I login to my test buy customer account it shows 2 people logged in as a members. This can't be right since I am the only person logged in. Did i miss something during the install ? It shows up correctly in my payment options and works with the test sell.
I'm guessing the whos-online tracker is still seeing that a separate session exists from a prior shopper. Or maybe it's reporting that you've got an admin session open? Usually inactive sessions get cleaned up automatically every 20 minutes.
But this has nothing to do with the Square module at all. The Square module doesn't change or add anything related to other visitor logins/sessions.
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
billsey5
Zen-Cart 1.5.5e, PHP 5.4.44, MySQL 5.6.15, Square Payment Module 0.90.
Is it possible to upgrade to a more current version of PHP? PHP 5.4 is really old: its last update was Sept 2015.
Quote:
Originally Posted by
billsey5
I am seeing the red (Access Token needed). When I click on the green Click here I get the prompt and I enter the login and password for Square which then closes the tab and returns me to my Zen-Cart admin tab.
The normal flow is:
- Click green button
- it takes you to the Square site, asking for login if you're not already logged in. Presents an authorization prompt if not already authorized.
- returns you to your store admin
- If the "Access Token Needed" alert is still showing, press F5 to reload the admin page in your browser.
Quote:
Originally Posted by
billsey5
I tried again a few minutes ago and didn't get that message again. I still just get returned without a request to authorize from Square.
Is the directory you've been quoting (C:/Web Files/localuser/CHCG/Shop/) a local development PC? Or is it the live production server for your domain?
What browser/s are you doing this Admin / SquareLogin in?
Quote:
Originally Posted by
billsey5
Where should I look for log files that might shed some light on this?
Any logs generated by the module are stored with other error reports in the /logs/ folder as "myDebug-xxxxxxxx.log" filenames.
Re: Square Payment Module for Zen Cart [Support Thread]
Let me try to cover everything, I have gotten closer though. The server is live, but not visible to the public yet. I'm using Firefox 59 and have tested with IE and Edge as well.
The cert is a Let's Encrypt cert. It seems like curl has problems with those even though no one else seems to. After using the test script for curl and putting a replacement cacert.pem file in the PHP environment, and upgrading the site to 5.6 the test script was able to run completely.
Once curl would work correctly the green button acted as it should and Square was active on the site.
I now find that I can add things to my cart, go through the checkout process until I get to the confirm my order where after I push the button it waits for a minute or two and then gives me a 500 - internal server error. A refresh of the page gives the warning about resending data the take me back to the payment information page with a "Unable to process payment due to a communications error. You may try again or contact us for assistance." notice.
Let me know where I can look for more info on fixing this.
Re: Square Payment Module for Zen Cart [Support Thread]
Quote:
Originally Posted by
billsey5
After ... putting a replacement cacert.pem file in the PHP environment, and upgrading the site to 5.6 the test script was able to run completely.
Once curl would work correctly the green button acted as it should and Square was active on the site.
Excellent. Glad the curl issue is sorted. And the SSL.
Quote:
Originally Posted by
billsey5
... go through the checkout process until I get to the confirm my order where after I push the button it waits for a minute or two and then gives me a 500 - internal server error.
In web terms, a "500 Internal Server Error" is a general message that's generic publicly because being more specific could put your site at risk. The actual system details that caused the issue will be found in server logs. If the problem occurred at the Zen Cart level, then it will be logged in the /logs directory as myDebug-xxxxxx.log files. Will need to see those messages to understand better what's up.