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

Square Payment Module for Zen Cart [Support Thread]

Sticky
Results 1 to 20 of 835
23 Jun 2017, 18:04
#1
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Square Payment Module for Zen Cart [Support Thread]

I'm pleased to announce today the release of the new Square Payments module for Zen Cart

You can download the plugin from https://www.zen-cart.com/downloads.php?do=file&id=156

And you can read setup instructions at https://www.zen-cart.com/content.php?349-Square-Payments-for-Zen-Cart or from the README in the plugin zip file.

The module currently requires Zen Cart v1.5.5 or v1.5.4
And the module is compatible with PHP 7.2, 7.1, 7.0, 5.6, 5.5, 5.4
09 Jul 2017, 15:40
#2
uncleboboflargo avatar

uncleboboflargo

New Zenner

Join Date:
Aug 2015
Posts:
10
Plugin Contributions:
0

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

Thanks a lot, I have been hoping for this for a long time, Square Is a great processor and the setup was pretty straight forward. No real issues other than after:

[h=2]Configure the Square Module in your store Admin
[/h]Step 4 - "Click Here to Login and Authorize Your Account."

I needed to Refresh the Payment Module page to proceed

Tested just fine without any errors and the refund process worked.

Thanks again, nice job..:clap:
10 Jul 2017, 13:49
#3
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

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

UncleBobOfLargo:

Thanks a lot, I have been hoping for this for a long time, Square Is a great processor and the setup was pretty straight forward. No real issues other than after:

[h=2]Configure the Square Module in your store Admin
[/h]Step 4 - "Click Here to Login and Authorize Your Account."

I needed to Refresh the Payment Module page to proceed

Tested just fine without any errors and the refund process worked.

Thanks again, nice job..:clap:


Glad that it worked for you.
20 Jul 2017, 14:58
#4
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

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

Update:

If you are changing domain name make sure you change your OAuth Return URL in your SqaureUp Account.
Login into your account with SqaureUp > Apps > My Apps upper right corner > Click on the OAuth.

Wade Morris
27 Jul 2017, 14:54
#5
aquaticaddiction avatar

aquaticaddiction

New Zenner

Join Date:
Apr 2008
Posts:
30
Plugin Contributions:
0

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

Super excited to use this app - Ive hit one little snag that I cant seem to make sense of.

I keep getting red text that says (Access Token needed) - I go through the steps in OAuth, I get a page that says something to the effect of "Token Added, please close this page" but then nothing changes.

Help?

Thanks!
27 Jul 2017, 15:07
#6
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Posts:
1,674
Plugin Contributions:
0

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

Did you try refreshing your browser?

Sometimes that message doesn't disappear right away, but refreshing your Admin Payment Modules page will see the message disappear, and things will be ready to go.
If it doesn't go, then the OAuth Redirect URL set in your Square account might not be correct.
27 Jul 2017, 17:45
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Posts:
9,707
Plugin Contributions:
6

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

In earlier testing, there were times when you had to click on the update button or hit enter to see the result.
28 Jul 2017, 09:53
#8
arukuti avatar

arukuti

New Zenner

Join Date:
Jul 2014
Posts:
2
Plugin Contributions:
0

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

I have installed square payments module.

In the checkout process step2 even though i entered working credit card details it was showing the error message like

" We could not initiate your transaction because of a problem with the card data you entered. Please correct the card data, or report this error to the Store Owner: SQ-NONCE-FAILURE"

Due to this i was not able move forward for the payment.

Even I enabled default theme, still same error.

I even tried disabling all other payment module(Paypal and CEOn manual card) still same error.

There is JS conflict browser console.

We haven't done any changes to default checkout flow.
Please see the attached screenshot.Attachment 17186
28 Jul 2017, 13:03
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

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

Arukuti:


" We could not initiate your transaction because of a problem with the card data you entered. Please correct the card data, or report this error to the Store Owner: SQ-NONCE-FAILURE"



There is JS conflict browser console.

You must resolve the javascript errors in your template before the module will work.
28 Jul 2017, 13:12
#10
arukuti avatar

arukuti

New Zenner

Join Date:
Jul 2014
Posts:
2
Plugin Contributions:
0

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

DrByte:

You must resolve the javascript errors in your template before the module will work.


Sorry for typo, there are no JS errors in console.
28 Jul 2017, 13:59
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

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

The Square module requires that you install all the files in the prescribed folders as per the documentation. If you don't, then the javascript which interacts with the Square servers can't obtain the token/nonce code that is used for processing a payment. When the token/nonce cannot be obtained, the SQ-NONCE-FAILURE error appears.
The javascript hooks into form elements built-in to the standard Zen Cart checkout flow, so those must be present in your template in order for it to work.
Additionally, your OAuth setup must also be completed as per the setup instructions in the documentation.

I just did a fresh setup of Zen Cart v1.5.5e on a brand new site, added the Square module and followed the instructions step by step. The first attempt at payment was successful.

https://www.zen-cart.com/content.php?349-Square-Payments
31 Jul 2017, 00:45
#12
dandjvinyl avatar

dandjvinyl

New Zenner

Join Date:
Jul 2017
Posts:
4
Plugin Contributions:
0

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

Hello, I've uploaded this module using FileZilla and followed all outlined steps. I continue to see the (Access Token needed) message in red. I've hit the update button at the top, pressed enter, refreshed the page, kicked my cat, drank a class of milk and did a hula dance but nothing seems to have worked. Are there any certain permissions that I need to maker sure are set on the files I've uploaded? I've gone folder to folder to make sure all files have uploaded and this files sizes match what's on my local drive. I've also deleted and remade apps on the Square Dev site to see if that was a problem.

When I click the green button it brings up a new window asking me to log into my account. When I put in my credentials it shows a loading icon over the login button for several seconds followed by a black page with black text in the upper left... this page closes so fast I'm not sure what the text says.
31 Jul 2017, 03:52
#13
dbair avatar

dbair

New Zenner

Join Date:
Jun 2017
Posts:
4
Plugin Contributions:
0

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

I have a client using Zen Cart 1.5.5e and the Square Payments Module 0.81. She needs to renew /refresh the OAuth token. She has tried all the suggestions in this thread (creating a new app, confirming the return URL, etc.) but the payment method is still not available. She indicates the refresh token link is "missing".

Any suggestions?

Thanks in advance!
31 Jul 2017, 22:37
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

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

When the module in your store Admin says "(Access Token needed)", it's because the OAuth token has NOT been successfully obtained from Square.

For the OAuth token to be obtained, the following (as documented in the installation instructions) must be in place:

a) square_handler.php must be on your server. It should be in the same directory as ipn_main_handler.php already exists.
b) the correct URL pointing to square_handler.php on your site must be entered into your Square's account OAuth Redirect URL setting.
c) click on the button to initiate the process of requesting a token. This will open a browser window to Square, and if you're not already logged in there, will ask for credentials.
d) After Square verifies the supplied credentials, it will show an almost-blank page with a small redirection message, before the window closes automatically.
e) Within 0-5 seconds after that almost-blank window closes, Square should have automatically sent a message to the OAuth Redirect URL (your square_handler.php file), which will read and validate Square's response, and update the token in your store. This happens automatically, and 99% of the time happens in less than 1 second.
f) Now refreshing your Zen Cart Admin screen will show that the "Get Token" button has disappeared, as well as the "(Access Token needed)" message.
The module is now fully functional.

Common causes of problems with this:
a) didn't upload square_handler.php
b) put square_handler.php into the wrong directory. It belongs in the "root" of your store's folders. For reference, "ipn_main_handler.php" also exists in this directory.)
c) didn't put the OAuth Redirect URL into Square's settings, or mistyped it.


Less common, but possible causes:
a) you've got URL-rewriting rules set up in .htaccess or nginx, which are disallowing square_handler.php to be reached, probably because you're redirecting those requests to some other URL/file. Fix: allow square_handler.php to accessed directly. You could clone any rules for ipn_main_handler.php for square_handler.php, as a starting point.

b) you're running on a test site using a fake/unreachable URL, according to Square's servers. Fix by using a real live website.

c) you're running behind a firewall that's got aggressive restrictions on which files are allowed to be accessed. This is simple. Just tell the firewall to allow normal port 443 access to square_handler.php .... just like any other file on a website should be able to do. Nothing special here.
01 Aug 2017, 12:36
#15
dbair avatar

dbair

New Zenner

Join Date:
Jun 2017
Posts:
4
Plugin Contributions:
0

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

Thank you.
Response from my client:

I do get the screen that says token has been updated when I'm redirected to square and put in my credentials. But zencart then goes green and the "needs token disappears but it doesn't become a payment method.

Any other suggestions?
01 Aug 2017, 17:51
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

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

dbair:

I have a client using Zen Cart 1.5.5e and the Square Payments Module 0.81. She needs to renew /refresh the OAuth token. She has tried all the suggestions in this thread (creating a new app, confirming the return URL, etc.) but the payment method is still not available. She indicates the refresh token link is "missing".

Any suggestions?

Thanks in advance!

dbair:

Thank you.
Response from my client:

I do get the screen that says token has been updated when I'm redirected to square and put in my credentials. But zencart then goes green and the "needs token disappears but it doesn't become a payment method.

Any other suggestions?

By "it doesn't become a payment method", I'm assuming they're trying to say "it shows in the Admin, but during checkout Square is not offered"?

Reasons for a payment module to not show during checkout (none of them are specific to Square):
- A Payment Zone restriction has been set, and the address being used for checkout isn't in that zone. Set Payment Zone to --none-- in the module, to remove all restrictions
- Another plugin is interfering with the default checkout process, and a billing country/state haven't been specified.
- Strange/unusual alterations to checkout templates. This is rare, but does happen, depending on who customizes them.


You haven't listed:
- what template is in use
- all the plugins on the site
- which other payment modules are enabled
01 Aug 2017, 18:50
#17
dbair avatar

dbair

New Zenner

Join Date:
Jun 2017
Posts:
4
Plugin Contributions:
0

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

Thank you for your response.
Yes, it does not become a payment method.

Other Payment module is PayPal Express.
Template is Responsive Classic.
The only plugin installed after zen cart was installed is ckeditor.



DrByte:

By "it doesn't become a payment method", I'm assuming they're trying to say "it shows in the Admin, but during checkout Square is not offered"?

Reasons for a payment module to not show during checkout (none of them are specific to Square):
- A Payment Zone restriction has been set, and the address being used for checkout isn't in that zone. Set Payment Zone to --none-- in the module, to remove all restrictions
- Another plugin is interfering with the default checkout process, and a billing country/state haven't been specified.
- Strange/unusual alterations to checkout templates. This is rare, but does happen, depending on who customizes them.


You haven't listed:
- what template is in use
- all the plugins on the site
- which other payment modules are enabled
01 Aug 2017, 20:17
#18
dbair avatar

dbair

New Zenner

Join Date:
Jun 2017
Posts:
4
Plugin Contributions:
0

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

Thank you again.
It was the location code.
Fixed now.


DrByte:

By "it doesn't become a payment method", I'm assuming they're trying to say "it shows in the Admin, but during checkout Square is not offered"?

Reasons for a payment module to not show during checkout (none of them are specific to Square):
- A Payment Zone restriction has been set, and the address being used for checkout isn't in that zone. Set Payment Zone to --none-- in the module, to remove all restrictions
- Another plugin is interfering with the default checkout process, and a billing country/state haven't been specified.
- Strange/unusual alterations to checkout templates. This is rare, but does happen, depending on who customizes them.


You haven't listed:
- what template is in use
- all the plugins on the site
- which other payment modules are enabled
01 Aug 2017, 20:22
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

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

dbair:

Thank you again.
It was the location code.
Fixed now.

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.
08 Aug 2017, 01:23
#20
sammirah avatar

sammirah

Zen Follower

Join Date:
Apr 2012
Posts:
185
Plugin Contributions:
2

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

Hi Dr. Byte,

1st problem I have is extractions of the file from the .zip I kept getting a Path too long error, which I tried skipping but it was a lot of files. Then I used filezilla to upload my extracted files and I can not find the square module anywhere even after refreshing. My assumption is all of the files are missing so I need to try this a different way. Any suggestions?
Attachment 17206