Post by Voltagescot » Wed Nov 11, 2020 6:24 am

Hi all

Having a issue with square extension I've been trying to figure out.
This is what shows on it I contacted square they have said it's on opencarts side.


An error was encountered while refreshing the token: Your request did not include an `Authorization` http header with an access token. 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://developer.squareup.com/docs/bui ... he-headers__. If you are seeing this error message while using one of our officially supported client libraries, please report this to developers@squareup.com
Your Square access token has expired or has been revoked! Click here to re-authorize the Square extension.


Any help greatly appreciated will update if I find fix 👍
Last edited by Voltagescot on Tue Nov 24, 2020 7:06 am, edited 1 time in total.

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am

Post by straightlight » Wed Nov 11, 2020 9:35 am

While the OC version has not been posted, try the extension one from the Marketplace: https://www.opencart.com/index.php?rout ... n_id=31311 . It might be more up-to-date.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Voltagescot » Thu Nov 12, 2020 1:30 am

Manually installed square now im having issues of it showing these errors.

Your Square access token has expired or has been revoked! Click here to re-authorize the Square extension. ( the click here java is void so cant click)

so everytime i click connect it no longer goes to square to login but instead logs me out of admin banging my head off the coffee table with this extension ive looked through tons of code,files etc and still cant find the fix :hammer:

error log shows /system/library/db/mysqli.php on line 7

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am

Post by Voltagescot » Thu Nov 12, 2020 2:03 am

UPDATE: i have figured this out and installed. For others please go to dashboard top left click gear icon and refresh your components.

Now it saying delayed capture is enabled and will be void in 6 days :( will update if find fix

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am

Post by Cue4cheap » Fri Nov 13, 2020 12:28 am

Voltagescot wrote:
Thu Nov 12, 2020 2:03 am
UPDATE: i have figured this out and installed. For others please go to dashboard top left click gear icon and refresh your components.

Now it saying delayed capture is enabled and will be void in 6 days :( will update if find fix
That is how you have it set up "authorization" and "delayed capture" versus sale. So if you don't wish to do that then change it to "sale".

Mike

cue4cheap not cheap quality


Expert Member

Posts

Joined
Fri Sep 20, 2013 4:45 am

Post by Voltagescot » Mon Nov 16, 2020 12:13 am

Sorted Thankyou O0

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am

Post by jbobfunky » Thu Feb 18, 2021 10:36 pm

Hello, I am having a similar problem with Square and the same error in Opencart 3.0.3.2.

When I go to the Square Extension I get an initial error:
####
" Your Square access token has expired or has been revoked! Click here to re-authorize the Square extension."
#####



When I "Click Here" for reauthorization. I get redirected to Square to log in, which I successfully do, then I get kicked back to Square Extensions in OC and the error:
######
" An error was encountered while refreshing the token: Your request did not include an `Authorization` http header with an access token. 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://developer.squareup.com/docs/bui ... he-headers__. If you are seeing this error message while using one of our officially supported client libraries, please report this to developers@squareup.com."
######



The Initial Debug error once enable spit out:
###############

2021-02-18 13:53:48 - PHP Notice: Undefined index: access_token in /home/blr6n36rcu71/public_html/legacytackle/admin/controller/extension/payment/squareup.php on line 633
2021-02-18 13:53:48 - Your request did not include an `Authorization` http header with an access token. 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://developer.squareup.com/docs/bui ... he-headers__. If you are seeing this error message while using one of our officially supported client libraries, please report this to developers@squareup.com.
2021-02-18 13:54:51 - PHP Notice: Undefined index: access_token in /home/blr6n36rcu71/public_html/legacytackle/admin/controller/extension/payment/squareup.php on line 633
2021-02-18 13:54:52 - Your request did not include an `Authorization` http header with an access token. 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://developer.squareup.com/docs/bui ... he-headers__. If you are seeing this error message while using one of our officially supported client libraries, please report this to developers@squareup.com.
2021-02-18 13:55:11 - PHP Notice: Undefined index: access_token in /home/blr6n36rcu71/public_html/legacytackle/admin/controller/extension/payment/squareup.php on line 633
2021-02-18 13:55:11 - Your request did not include an `Authorization` http header with an access token. 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://developer.squareup.com/docs/bui ... he-headers__. If you are seeing this error message while using one of our officially supported client libraries, please report this to developers@squareup.com.
###########

Then on second try (new error):
##################
2021-02-18 14:22:03 - SQUAREUP DEBUG START...
2021-02-18 14:22:03 - SQUAREUP ENDPOINT: https://connect.squareup.com/oauth2/token
2021-02-18 14:22:03 - SQUAREUP HEADERS: Array
(
[0] => Content-Type: application/json
)

2021-02-18 14:22:03 - SQUAREUP PARAMS: {"client_id":"XXXXXXXXXXXXXX","client_secret":"XXXXXXXXXXXXX","redirect_uri":"https:\/\/www.legacytackle.com\/admin\/index.php?route=extension\/payment\/squareup\/oauth_callback&user_token=XXXXXXXXXXXXXX","code":"XXXXXXXXXXXXXXXXX"}
2021-02-18 14:22:03 - SQUAREUP RESULT: {
"message": "missing required parameter 'grant_type'",
"type": "bad_request.missing_parameter"
}

2021-02-18 14:22:03 - PHP Notice: Undefined index: access_token in /home/blr6n36rcu71/public_html/legacytackle/admin/controller/extension/payment/squareup.php on line 633
2021-02-18 14:22:03 - SQUAREUP DEBUG START...
2021-02-18 14:22:03 - SQUAREUP ENDPOINT: https://connect.squareup.com/v2/locations
2021-02-18 14:22:03 - SQUAREUP HEADERS: Array
(
[0] => Authorization: Bearer
[1] => Content-Type: application/json
)

2021-02-18 14:22:03 - SQUAREUP PARAMS:
2021-02-18 14:22:04 - SQUAREUP RESULT: {"errors":[{"category":"AUTHENTICATION_ERROR","code":"UNAUTHORIZED","detail":"Your request did not include an `Authorization` http header with an access token. 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://developer.squareup.com/docs/bui ... he-headers__. If you are seeing this error message while using one of our officially supported client libraries, please report this to developers@squareup.com."}]}
2021-02-18 14:22:04 - Your request did not include an `Authorization` http header with an access token. 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://developer.squareup.com/docs/bui ... he-headers__. If you are seeing this error message while using one of our officially supported client libraries, please report this to developers@squareup.com.
###########################

This last error is new but I'm not sure what I did other than enable the debug mode. But at least its a better response.

In my version of OC the gear cog is in the upper right but I don't see a place to refresh any extensions when I click on it, Just the theme and SASS. So not sure if I am able to do that.

Thanks for checking this and any direction is greatly appreciated!

Diggin your quote,
~jbobfunky

Newbie

Posts

Joined
Tue Dec 08, 2020 7:57 pm

Post by Voltagescot » Fri Feb 26, 2021 8:32 pm

I managed to get mine working with square support if you contact them they will help fix if you still have problems I'll try find how I got mine working what theme are you using an OC version

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am

Post by Voltagescot » Fri Feb 26, 2021 8:35 pm

Also refresh sass an cache also go to modifications an refresh 😊

You can build your own dream or help build someone else's. O0


User avatar
New member

Posts

Joined
Wed Nov 11, 2020 6:16 am
Who is online

Users browsing this forum: No registered users and 16 guests