• Resolved iamganesh

    (@iamganesh)


    Hello team,

    While processing the sandboox payment it showing the following response.

    “errors”: [{“code”: “UNAUTHORIZED”,”detail”: “This request could not be authorized.”,”category”: “AUTHENTICATION_ERROR”}]}

    Exception has occurred.

    SquareConnect\ApiException: [HTTP/2 401] {“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\”).

    All keys are entered correctly!

    Looking forward to hearing from you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support AW a11n

    (@slash1andy)

    Automattic Happiness Engineer

    Hey there!

    This error message come directly from Square, and it only means one thing: There’s an issue with the credentials/keys you are using.

    Normally this means there’s an issue with the actual credentials, but there is a tiny chance that the server you are on is preventing it from connecting and authorizing properly. I would double and triple check your credentials, and then check with your host to see if they can see the requests being made, and what is happening to them.

    Hopefully that helps! Have a great one!

    Hi there @iamganesh,

    In addition to my colleague’s reply above, can you please check if you have any security plugins active?

    We’ve seen cases when plugins such as Sucuri Security - Auditing, Malware Scanner and Hardening: by Sucuri Inc. and its Automatic Secret Keys Updater feature are altering Square’s tokens stored in the database and that caused Square to disconnect frequently.

    Cheers!

    Thread Starter iamganesh

    (@iamganesh)

    Hello there,

    My site is HTTP, not HTTPS. It may cause this issue?

    Also, there is no SSL.

    • This reply was modified 4 years, 2 months ago by iamganesh.
    Plugin Support Aashik P – a11n

    (@aashik)

    Hi there!

    My site is HTTP, not HTTPS. It may cause this issue?

    While SSL is indeed required for Square live payments, I just tested this on my local site to confirm that payments go through on the Sandbox environment even on HTTP.

    The error you’re seeing is specifically regarding Authentication. I’d disconnect from Square and follow the instructions in Sandbox Mode – Documentation to see if that helps.

    If you’re still seeing the same error, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status.
    Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.

    Hi there @iamganesh,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘AUTHENTICATION_ERROR’ is closed to new replies.