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,744

Results 161 to 180 of 835
1 Jun 2018, 6:23 PM
#161
drbyte avatar

drbyte

Sensei

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

Square Payment Module for Zen Cart [Support Thread]

Remember, since you said you're upgrading from 0.90 to 0.94, there are a lot of files to replace, including the "vendor" directory. Don't skip those. :)

But, yes, replacing all the files is enough. It takes care of the db updates for you.

5 Jun 2018, 10:44 PM
#162
jsquared avatar

jsquared

New Zenner

Join Date:
Dec 2005
Location:
Kalamazoo, MI
Posts:
65
Plugin Contributions:
0

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

Hello.
I'm excited for the possibility of Square working directly with Zencart. Is there a plugin or way for Square POS orders to be integrated with Zencart? We would like to centralize into one system for both online and in-person orders but current the Square orders are in their own area with no integration. If there is another way to think about this, we'd be happy to look at it. We traditionally used a custom mod for USB swipe CC payments with Firstdata/Linkpointbut this functionality will no longer be possible soon.

5 Jun 2018, 11:31 PM
#163
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]

I began with square when you entered all items individually. I've got a few emails letting me know that, just because your latest suggestion showed up, we ain't paying you for it. Did some testing with DrByte and the Square Team on the current module

That's just to let you know that they do listen to the little guy. Over a dozen suggestions are now in the dashboard. One of the ones NOT there yet is the ability to automatically tie the databases together. That would be a definite plus to the store owner trying to keep online inventory current while (as one of our customers does) going around the country from rodeo to rodeo selling their wares.

I can also attest that the idea of tying thousands of databases into a central Square database is mind boggling. Perhaps it will be easier to have some addition to the configure files if using Square or a dropshipper. A database connection for product availability only in the configure.php is still daunting.

Still, we keep getting more and more with Square on a regular basis. Right now, they seem to be spending time figuring out a way to get more money through services. You can always put a bug in their ear either in their forum or the contact us in their website.

We'll keep our fingers crossed.

7 Jun 2018, 10:18 PM
#164
jsquared avatar

jsquared

New Zenner

Join Date:
Dec 2005
Location:
Kalamazoo, MI
Posts:
65
Plugin Contributions:
0

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

Thanks, this is good to know. The inventory thing would be helpful, and basic order info would be better. I know in order to actually get Email address from Square, you have to enter it in customer data or they won't give you access to it. The temp solution may be to write a script to import orders/customer info from Square to ZC and run it manually.

16 Jun 2018, 1:37 AM
#165
wsworx avatar

wsworx

Zen Follower

Join Date:
Jun 2012
Location:
California
Posts:
260
Plugin Contributions:
0

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

DrByte:

Thanks for reporting back.
The Location ID is normally automatically set to the first available location. But if you're using multiple locations, or have somehow tricked the system into storing a wrong location value, then there will be errors during checkout. Choosing one from the dropdown will resolve that.

What if the drop down is blank?

16 Jun 2018, 3:07 AM
#166
drbyte avatar

drbyte

Sensei

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

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

When the dropdown is blank it means ZC hasn't been able to retrieve a list of Locations from Square, which means you haven't Saved valid credentials and obtained a Token.
NOTE: It may be blank the "first" time you enter credentials and attempt to retrieve a token, but if you click Save and then get the Token, and then click Edit again it should show your defined Locations from your account.
Of course this assumes you've followed the setup instructions for creating the App inside your Square account, as that must be assigned to a Location, and if you don't have a Location set up in Square they'll make you set one first before you can get your Oauth credentials in the first place.

22 Jun 2018, 5:43 PM
#167
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

Hi people,
Trying to authorize new Square account on our Zen Cart Admin. I receive the following message "Missing client by that client_id" in new window after pressing the green button.
Any suggestion what I'm doing wrong?
Zen Cart v1.5.5f ; php 7.1.18
Thanks.

22 Jun 2018, 6:01 PM
#168
drbyte avatar

drbyte

Sensei

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

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

RobRiv:

Hi people,
Trying to authorize new Square account on our Zen Cart Admin. I receive the following message "Missing client by that client_id" in new window after pressing the green button.
Any suggestion what I'm doing wrong?
Zen Cart v1.5.5f ; php 7.1.18
Thanks.
The "client_id" it's referring to behind the scenes is the value you're supposed to enter into the module's configuration as "Application ID". You need to supply your Application ID and oAuth Application Secret before clicking the Green get-a-token button.

22 Jun 2018, 6:16 PM
#169
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

DrByte:

The "client_id" it's referring to behind the scenes is the value you're supposed to enter into the module's configuration as "Application ID". You need to supply your Application ID and oAuth Application Secret before clicking the Green get-a-token button.

Thank you DrByte for your prompt response.
Both Application ID and OAuth are inserted in the module's configuration.
Possible issues: 1-account is Canadian Square account (however when pressing "Log in To Your Square Account" in Admin module it correctly opens the proper Square account.)
2-When creating the APP in Square I used Developer Portal (however in "My Apps" in Square it shows permission from account.)
Any help will be appreciated.

22 Jun 2018, 6:54 PM
#170
drbyte avatar

drbyte

Sensei

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

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

Hmm, I haven't seen any problem when using a Canadian Square account.

  • created the App in Square
  • obtained the oAuth stuff, and told Square the URL to the store
  • put the app credentials into Zen Cart, saved those settings
  • click the green Token button
  • login to Square
  • return to store admin, refresh the page, green button goes away
  • click Edit and choose the Location from the dropdown, click Save
  • ready to take payments
22 Jun 2018, 7:56 PM
#171
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

DrByte:

Hmm, I haven't seen any problem when using a Canadian Square account.

  • created the App in Square
  • obtained the oAuth stuff, and told Square the URL to the store
  • put the app credentials into Zen Cart, saved those settings
  • click the green Token button
  • login to Square
  • return to store admin, refresh the page, green button goes away
  • click Edit and choose the Location from the dropdown, click Save
  • ready to take payments

Thank you DrByte.
Found the problem looking at the reference link of the error message. The Application ID inserted in Zen Cart module repeated the few characters "sq0idp-" that were left from initial blank module.
Now working.
Thank you again.

18 Jul 2018, 5:00 PM
#172
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

I'm unable to run the Square cron job. I receive the following message when running from Plesk "Task ..../…./square_handler.php completed with error in 1 seconds."

No change in Personal AccessToken achieved. No error report in php (I changed square_handler.php to $verbose=true).

Using Zen Cart v1.5.5f; Square Module 0.94; php 7.1.19.

Any help appreciated.

18 Jul 2018, 5:10 PM
#173
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]

Some instructions on setting up a plesk cron at http://tinyurl.com/y8eykjnu See if yours matches the info.

18 Jul 2018, 5:27 PM
#174
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

dbltoe:

Some instructions on setting up a plesk cron at http://tinyurl.com/y8eykjnu See if yours matches the info.

Thank you dbltoe.
I read your link and it's not applicable to me. I'm with A2 Hosting and other schedule tasks work fine. In particular I have the currency update cron job for Zen Cart working without problems.

18 Jul 2018, 8:02 PM
#175
drbyte avatar

drbyte

Sensei

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

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

RobRiv:

I'm unable to run the Square cron job. I receive the following message when running from Plesk "Task ..../…./square_handler.php completed with error in 1 seconds."

No change in Personal AccessToken achieved. No error report in php (I changed square_handler.php to $verbose=true).

Using Zen Cart v1.5.5f; Square Module 0.94; php 7.1.19.

Any help appreciated.
Since you've changed $verbose to true, what happens when you visit your_store.com/square_handler.php via your browser? It should tell you the status of the token.

I wonder if you have the wrong path. How is this "task" command different from the one you have for the currency cron?

18 Jul 2018, 8:45 PM
#176
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

DrByte:

Since you've changed $verbose to true, what happens when you visit your_store.com/square_handler.php via your browser? It should tell you the status of the token.

I wonder if you have the wrong path. How is this "task" command different from the one you have for the currency cron?

Thank you DrByte.
Status of the token shows not expired and it's logic since there have been transactions during the day. However the actual token in Square Dashboard (APPS) has not changed after the cron job.

I include screen of scheduled tasks. Currency Update has the same parameters except for the location of executable php.
Thank you again.

18 Jul 2018, 9:06 PM
#177
drbyte avatar

drbyte

Sensei

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

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

Yes, the actual token won't change unless Square issues an exchange for it, either because they've decided it's time to rotate it, or because it's expired. Since it hasn't expired (which doesn't happen unless unused for 30 days), it's unsurprising that there's no observable change.

It shouldn't be giving any error though. When there's nothing to renew, it exits with status code of 0, meaning no error.

20 Jul 2018, 4:10 PM
#178
robriv avatar

robriv

New Zenner

Join Date:
Jan 2018
Location:
Toronto, Canada
Posts:
19
Plugin Contributions:
0

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

DrByte:

Yes, the actual token won't change unless Square issues an exchange for it, either because they've decided it's time to rotate it, or because it's expired. Since it hasn't expired (which doesn't happen unless unused for 30 days), it's unsurprising that there's no observable change.

It shouldn't be giving any error though. When there's nothing to renew, it exits with status code of 0, meaning no error.
I changed the Schedule Task in Plesk from Run a Command to Fetch a URL and now no error.
Thank you DrByte

15 Aug 2018, 1:09 AM
#179
redradar avatar

redradar

New Zenner

Join Date:
Mar 2006
Location:
San Francisco, CA
Posts:
44
Plugin Contributions:
0

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

Zen Cart v1.5.5f
Site was upgraded about a month ago from v1.5.4 to 1.5.5f
We had our ISP do the upgrade and they set up a test site so assume it was an official upgrade procedure.
We use plug-ins Cross-Sell (X-Sell), Image Handler, Flexible Footer Menu, Wishlist, Westminister theme.
Our problem is payment-related to the Square 0.94 plug-in. We also have Check/Money Order, PayPal Express Checkout enabled (green). Authorize.net (AIM) and COD options are yellow; all others in Payment Module are red.
PHP Version 5.6.37 ; mysqlnd 5.0.11-dev - 20120503 - $Id:
Everything was working as expected until we needed a new Access Token for our Square account about a month after the upgrade. We have updated these tokens in the past with no problems prior to the recent upgrade. We successfully replaced our Personal Access Token in our Square account (and received confirmation of that within Square), copied the new token into our Zen Cart Square payment module, and updated the module. However, we are still getting the following error via e-mail with every customer who tries to place an order paying via credit card:

Results Received back from Square: Array
(
[401] => [HTTP/1.1 401 Unauthorized] {"errors":[{"category":"AUTHENTICATION_ERROR","code":"ACCESS_TOKEN_REVOKED","detail":"The provided OAuth access token has been revoked."}]}
)

We have spoken with Square and they said the problem must be in the Zen Cart module because we are able to manually input orders successfully via the virtual terminal within our Square account. We have contacted our ISP about this and received this response:

"There has been no update to server recently. However, we have found that shopping cart does shift to HTTPS upon checkout, so that may be a factor.

"We have checked the six possible conditions listed under "Problems with OAuth Token Generation" at - https://www.zen-cart.com/content.php?349-Square-Payments-for-Zen-Cart&styleid=3.

"None of these conditions are valid in this case.The files concerned have not been modified in months, and there is no .htredirect that is forcing redirects.

"As per the HTTP and HTTPS logs for holymtn.com for "square_handler.php", which Square accesses to complete transactions. In the past 2 weeks, there have been zero attempts to access this file from the outside. This suggests that either the plugin is misconfigured, or there is another error preventing Square from accessing the URL.

"At this point I think that Square should be contacted, as I have not found anything server-side that is generating errors."

We have replaced the access tokens three times but there has been no change in results.

We have read through the FAQs and searched for an answer in the forum area but without success. Can you please help? Here's our URL:

https://www.holymtn.com/catalog

Thank you in advance for any light you can shed on this.

15 Aug 2018, 2:34 AM
#180
drbyte avatar

drbyte

Sensei

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

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

Your store does NOT use your "Personal Access Token", so resetting that won't fix anything for your store.

The Oauth token referred to by the "ACCESS_TOKEN_REVOKED" message is NOT your "personal access token". it's a token that you can't see or set anywhere by hand. That token is generated by requesting it using the AppID/Secret from your account's OAuth settings after you enter those settings into your store.

The "ACCESS_TOKEN_REVOKED" message means that the token you've entered is no longer valid. More specifically, it's been forcefully deactivated/revoked on Square's end. (And I'm guessing that's probably because it's still referring to the old token that expired and then ran out past the grace-period for renewal.)

I'm sad that the Square rep didn't go further and make sure they were actually receiving requests for your AppID on their end. Their tech team could explain the token failure in more detail if they followed it through.

At this point I think there are 2 factors to consider:

  1. Have you created more than one "app" in your Square account? You only need ONE.
    Most merchants won't have more than one such "app", so this may be a non-issue. But if you have multiple, be sure you understand why you've done that, and be sure you're grabbing the AppID/Secret (and setting the OAuth Return URL) for the right one when configuring your ZC module in your store.

  2. Let's do a reset:
    a. in your ZC Admin, go to your Square module, and click Remove, and confirm it. This should also reset any old negotiated tokens so there should be no "revoked" response anymore.
    b. Then click Install to re-add it. You will need to re-configure it from scratch again by entering your AppID and Secret from your Square "app". (explained in the "Configure the Square Module in your store Admin" of https://www.zen-cart.com/content.php?349-Square-Payments ) and clicking the green Access Token button so that it negotiates a new Oauth token for you.