how do I do that?
Printable View
how do I do that?
Use your browser's "Developer Tools" (for FireFox and Chrome, that's opened by pressing the F12 key if running on Windows). That will open up (by default) additional information in the bottom portion of your display.
Click on the Console tab and you'll see various messages associated with files' loading and javascript/jQuery information and (most importantly) errors. That should allow you to hone in on the culprit.
Some people prefer less worries about the PCI security parts.
I have an issue maybe you can provide some insight. This is a clone outdoorcountrydecor com, the other is working fine. There are no errors and they reside on the same server. Zen 1.5.5F, PHP 7.1.26, Square 0.96.
I cannot get Oauth to confirm. The cloned site is in the same Square account, as well as 3 others working fine with their own location IDs, same as this one.
HTTPS is fine, couldn't locate any JS errors, zero logs being produced, uninstalled & reinstalled, re-uploaded module files & again un-re-installed, created a new ap and swapped out the numbers, changes the Oauth token manually, redirect url is correct.... nothing, you push green button to authorize, takes you to square, login, back to the site with url paramenters... stalls, never finishes or completes. Refreshs do nothing either.
~Melanie
I was wondering if someone might be able to help me out with the square module (v.96) not redirecting correctly and not authorizing. I updated my site and did a clean install (currently using v1.5.5f) and the module is no longer working. Before doing a fresh install it was working just fine. Since I've never had this issue I'm not sure how to go about finding a solution. I looked on the forums and didn't see any posts on a similar topic. I could have over looked it, and if I did I do apologize.
What is happening is when I click the green authorize button it loads the square login page, I log in and taken to blank page with no message. If I try refreshing the admin page it still shows (Access Token needed).
Both my application ID and OAuth are correct and the redirect link is set to https://mysite.com/square_handler.php (which the file is in the root directory).
The only difference is before doing a fresh install I worked on and designed the new site in a test directory before transferring it to the root directory.
If anyone has any advice or can point me in the right direction to fix this issue I would be very appreciative.
Thanks,
Steve
@mprough and @jewelm,
You can do some basic debugging by editing line 11 of the square_handler.php and setting false to true.
@jewelm, Are you sure you brought the square.handler.php file over from test to production? Square needs to be told the correct URL and of course the file needs to exist.
What happens when you go to https://your_site.com/square_handler.php ? (yes, HTTPS) Normally you want to just see a white page. But if you're getting an error (ie: 404-not-found, etc) then you'll need to fix that, cuz Square will also see the error and thus will fail.
After setting $verbose=true like I mentioned above, visiting the square_handler.php with your browser should give you some text about the current token status according to your store. You can use that for troubleshooting.
Oh wow thank you for the quick reply DrByte. Yeah everything was transferred over correctly (other than this, everything is working just fine) The configure files have also been updated.
If I load the square_handler.php page it does load to a blank page. No errors.
I've just been trying to narrow down things to figure where to look and while in the square app if I change the redirect url from https://mysite.com/square_handler.php to just https://mysite.com then the redirect does work. (using admin>payments>square>click green authorize button>login>redirected to site homepage).
Does this indicate an issue with the square_handler.php file itself?
Thanks again.
Edit: Changing the redirect url was just a test to see if logging into square would work and trigger the redirect. I know it wouldn't be able to authorize or get the access token to get the module to run.
An Update to my previous post. This evening I spent some time trying to figure it out and haven't come up with any solutions. I ended up installing a default zen cart (no custom templates or extra plugins) v1.5.5f into a new directory (/dev) and the same issue happened.
The redirect blank screen and url I am seeing after logging in from clicking the green authorize button is:
https://mysite.com/dev/square_handler.php?code= (an OAuth that is different than mine that changes with each attempt) &state= (set of random numbers that also change after each attempt)#_=_
Not sure if that is any indication, but that is where I am at currently.
As stated earlier everything was working just fine a few days ago. I wanted to clean up the sites back end and database. So I created a test directory, installed a clean v1.5.5f and new database. Installed all the plugins and template I use, got it back up in running and transferred it to the root directory. The only thing I did not set up was the payment modules, which is just paypal and square, until the updated site was on the root directory. Paypal set up just fine and payments process during checkout.
Nothing was changed on my host or in my square account. I did try creating a new square app, but same issue and url happened.
-Steve
I can confirm with Jewelm of this also for myself
@DrByte thisQuote:
https://mysite.com/dev/square_handler.php?code= (an OAuth that is different than mine that changes with each attempt) &state= (set of random numbers that also change after each attempt)#_=_
whether authorizing or simply loading the page in my browser simply says failureQuote:
You can do some basic debugging by editing line 11 of the square_handler.php and setting false to true.
I am also having issues getting the module set up. I have verified the Application ID, and Application Secret (Oauth) values match what is configured in the app on my Square account. I have also verified the Oauth Redirect URL is correct.
When I click the green button to get the token, I am taken to my square account login page. After entering my credentials, I receive an HTTP 417 error, which is an 'Expectation failed' error, which indicates that the expectation in the Expect header of the web request could not be met.
I enabled the additional messages ($verbose = true) and get the message 'failure'.
While attempting to troubleshoot, I disabled the .htaccess file for this site, which only contained rewrite rules to prevent site image scraping (still currently disabled).
I am running Zen Cart 1.5.6a, Database patch level 1.5.6, PHP 5.6.40 (I plan to move this to 7 as soon as I can - there are other dependencies on my hosting account that presently prevent this), MySQL 5.5.5-10.1.38-MariaDB, Square Payments Module 0.96.
I am open to any suggestions to get this working, and will provide any additional information as necessary (and appropriate, of course).
I am getting the exact same issue as stated above, my square_handler appends the following code after the .php (square_handler.php?code=sq0cgp-j_F4unDPtGZ02XK5gVKs1Q&state=5c7806a1d350a#_=_) None of that extra stuff is my account creds. I changed to True as well on thatsquare_handler.php file and the word failure is all that shows up, as mentioned by radiowave above. Running 1.5.6a - Square 0.96 - PHP version: 5.6.30 - Server version: 5.7.25 - MySQL Community Server (GPL).