Quote Originally Posted by jmsnyder23 View Post
I've uploaded all the files to the right locations on my server, created an app in my Square account, set the redirect URL to my domain, but I still have the red warning "(Access Token Needed)" in my Zen Cart Admin / Modules / Payment.

When I click on the "Click here to login and Authorize your account" button, I'm taken to the Square site where I log in. Then the page refreshes and I'm at my domain.

When I try to edit the module, there is nothing in the Location dropdown. How do I get something to appear here?

No matter how often I refresh my Admin page, the warning never goes away, and Square isn't one of the options listed for checkout.

Please help!

J.M. Snyder
Here's how it works:
- You put the correct URL into the OAuth setting in your Square account.
- In your store Admin, you fill in your account credentials (App ID and App Secret, especially)
- In your store Admin you see the Token button for Authorizing your account, and click it
- This takes you to the Square website where you approve the issuing of a token (it may ask you to login to Square if you weren't already)
- In the background it sends a small message to the OAuth URL
- If the incoming message to the OAuth URL is valid (and if the URL is correct, and not blocked by any .htaccess redirects or SEO-URL intercepts), then the issued token will be saved to your store and the module activated properly.
- Upon (manual) reload or re-visit of the Payment Modules page in your Admin, the Token button and error message will disappear from the Square module, and the module will show up on the storefront side, ready to take payments. Also, clicking the Edit button on the Square module will now show a list of Locations in the Locations Dropdown.

What can go wrong, thus preventing tokens from being issued properly?
- incompatible PHP version (You didn't mention your PHP version)
- files in wrong directories, or files missed from upload
- wrong URL entered into Square OAuth screen
- .htaccess URL rewrites blocking access to the square-handler URL
- plugins interfering with normal operation, including URL-rewriters, or so-called "SEO URLs"

Also, you didn't mention your Zen Cart version.