Zen Cart Logo
Forums / Addon Payment Modules / Square Payment Module for Zen Cart [Support Thread]

Square Payment Module for Zen Cart [Support Thread]

Sticky

Views: 366,752

Results 141 to 160 of 835
4 May 2018, 3:11 AM
#141
jasonshanks avatar

jasonshanks

Zen Follower

Join Date:
Feb 2009
Location:
atlanta GA
Posts:
296
Plugin Contributions:
0

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.

4 May 2018, 3:49 AM
#142
billsey5 avatar

billsey5

New Zenner

Join Date:
Apr 2018
Location:
Oregon
Posts:
13
Plugin Contributions:
0

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?

4 May 2018, 11:58 PM
#143
billsey5 avatar

billsey5

New Zenner

Join Date:
Apr 2018
Location:
Oregon
Posts:
13
Plugin Contributions:
0

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%29: 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%29: 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

14 May 2018, 4:06 AM
#144
billsey5 avatar

billsey5

New Zenner

Join Date:
Apr 2018
Location:
Oregon
Posts:
13
Plugin Contributions:
0

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?

14 May 2018, 6:02 AM
#145
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

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

This could be a problem...```
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/>
14 May 2018, 3:17 PM
#146
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

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.

14 May 2018, 3:24 PM
#147
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

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.

14 May 2018, 3:40 PM
#148
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

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.

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.

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?

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.

15 May 2018, 3:22 AM
#149
billsey5 avatar

billsey5

New Zenner

Join Date:
Apr 2018
Location:
Oregon
Posts:
13
Plugin Contributions:
0

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.

15 May 2018, 4:59 AM
#150
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

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.

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.

28 May 2018, 10:58 AM
#151
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

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

On a checkout page with multiple payment options I was looking into a way to tidy it up by hiding the Square Payments credit card info until that payment type was selected. Having tinkered around with some javascript and given the console error messages I get, am I right in assuming that Square requires the credit card fields to be visible i.e. not hidden by css?

Edit: just realised those were console warnings not errors, so that may not be the reason my edits are not working. However, being warnings I guess my question still stands.

29 May 2018, 4:53 PM
#152
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

Short answer: I don't know.
Longer answer: They probably don't enforce it one way or the other.

If toggling display "is not working" for you, then you're probably not targeting the right DOM object, or you need another one to nest things into.

With Square each of those inputs is its own frame, and you can't control the contents of that frame using CSS. But you can control a wrapper that contains them.

31 May 2018, 1:08 AM
#153
billsey5 avatar

billsey5

New Zenner

Join Date:
Apr 2018
Location:
Oregon
Posts:
13
Plugin Contributions:
0

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

OK, I seem to have it working smoothly now by putting the site on a different server running Linux instead of Windows. I'm trying to figure out how to issue a refund for an order or a portion of an order. The blurb says that when I'm viewing an order there should be a refund button and I'm not seeing it. Has anyone got a screen shot or a click by click walk through for me?

31 May 2018, 1:13 AM
#154
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,675
Plugin Contributions:
0

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

billsey5:

OK, I seem to have it working smoothly now by putting the site on a different server running Linux instead of Windows. I'm trying to figure out how to issue a refund for an order or a portion of an order. The blurb says that when I'm viewing an order there should be a refund button and I'm not seeing it. Has anyone got a screen shot or a click by click walk through for me?

billsey,
In order to issue an refund you must go through the Admin. Go to the customers order you should able click on a button to refund.

31 May 2018, 2:41 AM
#155
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

Doing a refund in the Admin:
Attachment 17880Attachment 17881

31 May 2018, 3:55 AM
#156
billsey5 avatar

billsey5

New Zenner

Join Date:
Apr 2018
Location:
Oregon
Posts:
13
Plugin Contributions:
0

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

Yeah, I'm not seeing that entire middle section.
Attachment 17882

31 May 2018, 12:47 PM
#157
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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

It seems that the transaction id being returned from Square is longer than it was when we first started storing those responses in order for this admin refund feature to "find" the detail.
Version 0.94 and newer will detect and fix the storage for future transactions. Unfortunately not able to lookup prior transactions between when Square changed it and when v0.94 fixes it. (older transactions prior to the change should show up for refunds fine, if they're within the allowed # of days where refunds are permitted)

You can apply the fix yourself by going to Admin->Tools->Install SQL Patch
and pasting in the following:

ALTER TABLE square_payments MODIFY transaction_id varchar(255) NOT NULL;

This will allow future transactions to be remembered and the refund option should show again.

1 Jun 2018, 1:28 AM
#158
billsey5 avatar

billsey5

New Zenner

Join Date:
Apr 2018
Location:
Oregon
Posts:
13
Plugin Contributions:
0

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

Thanks, I've made the change (had to prefix the table name with zen_ to match my configuration) and will upgrade to 0.94 when possible. I'm still on 0.90 I think.

1 Jun 2018, 2:04 AM
#159
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

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

In our experience, the worst that has happened from just dropping the new files over the old is that one user had to log in to Square to update. That customer was at 9.0 but I didn't notice if the "yellow light" was on before the drop (ftp).

There's more to this than the database table settings. While they may not currently effect performance, we prefer to keep shipping and payment as current and correct as possible.

1 Jun 2018, 3:15 AM
#160
billsey5 avatar

billsey5

New Zenner

Join Date:
Apr 2018
Location:
Oregon
Posts:
13
Plugin Contributions:
0

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

So pretty much just upload the new build over the old one and it does any database changes for you? That sounds easy enough. :)