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