Post by franktroy » Sat Aug 31, 2019 7:31 pm

My Square Extension continually has this error: Your Square access token has expired or has been revoked! Click here to re-authorize the Square extension.

When I click the blue "Connect" button i am redirected to my Square account and when I log in I get the following.

Notice: Undefined index: access_token in /home/dooverta/public_html/opencart/admin/controller/extension/payment/squareup.php on line 633Warning: Cannot modify header information - headers already sent by (output started at /home/dooverta/public_html/opencart/admin/controller/startup/error.php:34) in /home/dooverta/public_html/opencart/system/library/response.php on line 36

Any pointers is appreciated.
Thanks

Newbie

Posts

Joined
Sun Aug 18, 2019 5:32 pm

Post by rjcalifornia » Sat Aug 31, 2019 11:25 pm

franktroy wrote:
Sat Aug 31, 2019 7:31 pm
My Square Extension continually has this error: Your Square access token has expired or has been revoked! Click here to re-authorize the Square extension.

When I click the blue "Connect" button i am redirected to my Square account and when I log in I get the following.

Notice: Undefined index: access_token in /home/dooverta/public_html/opencart/admin/controller/extension/payment/squareup.php on line 633Warning: Cannot modify header information - headers already sent by (output started at /home/dooverta/public_html/opencart/admin/controller/startup/error.php:34) in /home/dooverta/public_html/opencart/system/library/response.php on line 36

Any pointers is appreciated.
Thanks

This could be happening for several reasons, such as:
Possible cause 1) Forbidden access to curl_exec function (configured in php.ini)
Possible cause 2) Your web server cannot do requests to https://connect.squareup.com/oauth2/token
- there could be name resolution (DNS) issues
- or some kind of security software blocking the requests (firewall for example)
- something else of which we are not aware
Source: viewtopic.php?t=186335#p681772

It could also be another vqmod that have some conflicts with the square extension.

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by franktroy » Sun Sep 01, 2019 6:57 pm

Thank you rjcalifornia for the suggestions. Just some additional information I am running 3.0.3.2 of Opencart installed by Softaculous on a hosted server.

rjcalifornia I checked the suggestions you provided and there is no issues with those. I do see an error in my log showing my server can connect due to Authentication is not working.

2019-08-31 21:42:39 - SQUAREUP RESULT: {"errors":[{"category":"AUTHENTICATION_ERROR","code":"UNAUTHORIZED","detail":"The Authorization http header of your request was malformed. The header value is expected to be of the format \"Bearer TOKEN\" (without quotation marks), where TOKEN is to be replaced with your access token (e.g. \"Bearer ABC123def456GHI789jkl0\"). For more information, see https://docs.connect.squareup.com/api/c ... nseheaders. If you are seeing this error message while using one of our officially supported SDKs, please report this to developers@squareup.com."}]}

Do you have any additional guidance that I can try?

Thank you!
Frank

Newbie

Posts

Joined
Sun Aug 18, 2019 5:32 pm
Who is online

Users browsing this forum: No registered users and 3 guests