• Resolved Peggy

    (@lpjjonine)


    I previously connected to Square in Sandbox mode but I can’t connect for Production Mode. I click on Production and click on Connect to Square, login and and get the message –

    You just authenticated Square!

    We’d like to redirect you to:

    https://rs.pt-devsites.com/wp-admin/

    That’s my site – redirect me

    But when I go back it’s still in Sandbox mode and when I click on Production again it wants me to connect to Square again. The button “Connect to Square” appears again.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Hey there, @lpjjonine! Thanks for contacting us. I’m happy to help you.

    Can you please try again and when this happens please check the browser console log and share a screenshot of it with us so we can take a look at the errors there (if any)?

    I recommend using https://snipboard.io. You can share the direct link to the image as a response to this topic.

    To check the console log you can press F12 (depending on your keyboard it may be FN + F12).
    Then, make sure you are in the Console tab like this:

    Please make sure to share everything you see there, you can share multiple screenshots if needed ??

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter Peggy

    (@lpjjonine)

    Thread Starter Peggy

    (@lpjjonine)

    Here is the console log as well, sorry I saw thinking you wanted the log from Woocommerce. That was the other screenshots I sent. Here’s the console screenshot –

    https://snipboard.io/seapk2.jpg

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @lpjjonine,

    Thank you for the screenshots, the error suggest there’s an authorization error and the business locations cannot be retrieved, both of which are necessary to setup your connection with Square.

    Please keeping in mind that you must be the?owner?of the Square account to do so. This integration needs access to much of the data in your Square account, and Square only grants these permissions to owners.

    If you get an “Unauthorized” error when attempting to connect with Square, please check with Square if you are the owner of the account you’re connecting to.

    Learn more: https://woocommerce.com/document/woocommerce-square/setup-and-configuration-of-the-woocommerce-square/#section-5.

    Cheers!
    -OP

    Thread Starter Peggy

    (@lpjjonine)

    Thanks OP!!

    So I am logged in to the owners account using her credentials. Are you saying something in her Square account needs fixed?

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @lpjjonine,

    Thank you for sharing an update on this.

    So I am logged in to the owners account using her credentials.

    Glad to hear you were able to log into the owner’s account. Are you able to follow the steps to get connected to Square, as detailed here?

    Are you saying something in her Square account needs fixed?

    At this point, we’re unable to tell if it is the account that needs fixing, but you can try the steps I’ve suggested above to see if you’ll get the same results.

    Looking forward to assisting you further.

    Thread Starter Peggy

    (@lpjjonine)

    Thanks fo much for you’re help! I am still not able to connect to Square. The address location is the same as in Woocommerce and I added the dev domain to the Square app section. It lists Unable to verify domain with Apple Pay but we don’t want to setup Apple Pay.

    This is in the log –

    2024-07-31T17:37:45+00:00 Notice Error: Unable to verify domain with Apple Pay – missing access token. Additional context{ “_legacy”: true } 2024-07-31T17:38:02+00:00 Notice Access token successfully received. Additional context{ “_legacy”: true } 2024-07-31T17:38:02+00:00 Notice Refresh token successfully received. Additional context{ “_legacy”: true } 2024-07-31T17:38:03+00:00 Notice Authorization error occurred, attempting a refresh. Additional context{ “_legacy”: true } 2024-07-31T17:38:03+00:00 Notice Disconnected due to invalid authorization. Please try connecting again. Additional context{ “_legacy”: true } 2024-07-31T17:38:03+00:00 Notice Request Request method: uri: listCustomers user-agent: WooCommerce-Square/4.7.2 (WooCommerce/9.1.4; WordPress/6.6.1) headers: Array ( ) body: duration: 0.61142s CONTEXT: {“_legacy”:true} 2024-07-31T17:38:03+00:00 Notice Response Response code: 401 message: headers: Array ( [0] => HTTP/1.1 401 Unauthorized [Date] => Wed, 31 Jul 2024 17:38:03 GMT [Content-Type] => application/json [Content-Length] => 161 [Connection] => keep-alive [CF-Ray] => 8abf5c238c1c639e-ORD [CF-Cache-Status] => DYNAMIC [Strict-Transport-Security] => max-age=631152000; includeSubDomains; preload [Vary] => Origin, Accept-Encoding [x-content-type-options] => nosniff [x-download-options] => noopen [x-envoy-decorator-operation] => /v2/customers/** [x-frame-options] => SAMEORIGIN [x-permitted-cross-domain-policies] => none [x-sq-dc] => sjc2b [x-sq-envoy-safe-auth-decision] => UNAUTHORIZED [x-sq-region] => sjc2b [x-xss-protection] => 1; mode=block [Set-Cookie] => __cf_bm=YekPsfpkeZkN5uv2UDSNe1j4RWRXu_F5fgnYlN4oiXg-1722447483-1.0.1.1-Yzpzkn9VcM8GXRSRPBN6MORHBR1zWAek.Y3vYaDsxSa5wpwvHvl7Hawb2s3zGdToCEau8jhl9gu.lFUS9E_qzQ; path=/; expires=Wed, 31-Jul-24 18:08:03 GMT; domain=.squareupsandbox.com; HttpOnly; Secure; SameSite=None [Server] => cloudflare ) body: Array ( [0] => Square\Models\Error Object ( [category:Square\Models\Error:private] => AUTHENTICATION_ERROR [code:Square\Models\Error:private] => UNAUTHORIZED [detail:Square\Models\Error:private] => This request could not be authorized. [field:Square\Models\Error:private] => ) ) CONTEXT: {“_legacy”:true} 2024-07-31T17:38:04+00:00 Notice Error: Unable to verify domain rs.pt-devsites.com – response = Array ( [errors] => Array ( [0] => Array ( [category] => AUTHENTICATION_ERROR [code] => UNAUTHORIZED [detail] => This request could not be authorized. ) ) ) CONTEXT: {"_legacy":true} 2024-07-31T17:38:04+00:00 Notice Authorization error occurred, attempting a refresh. Additional context{ "_legacy": true } 2024-07-31T17:38:04+00:00 Notice Disconnected due to invalid authorization. Please try connecting again. Additional context{ "_legacy": true } 2024-07-31T17:38:04+00:00 Notice Request Request method: uri: listLocations user-agent: WooCommerce-Square/4.7.2 (WooCommerce/9.1.4; WordPress/6.6.1) headers: Array ( ) body: duration: 0.52507s CONTEXT: {"_legacy":true} 2024-07-31T17:38:04+00:00 Notice Response Response code: 401 message: headers: Array ( [0] => HTTP/1.1 401 Unauthorized [Date] => Wed, 31 Jul 2024 17:38:04 GMT [Content-Type] => application/json [Content-Length] => 161 [Connection] => keep-alive [CF-Ray] => 8abf5c2808596357-ORD [CF-Cache-Status] => DYNAMIC [Strict-Transport-Security] => max-age=631152000; includeSubDomains; preload [Vary] => Origin, Accept-Encoding [x-content-type-options] => nosniff [x-download-options] => noopen [x-envoy-decorator-operation] => /v2/locations [x-frame-options] => SAMEORIGIN [x-permitted-cross-domain-policies] => none [x-sq-dc] => sjc2b [x-sq-envoy-safe-auth-decision] => UNAUTHORIZED [x-sq-region] => sjc2b [x-xss-protection] => 1; mode=block [Set-Cookie] => __cf_bm=cA7UVeu4TA8JOfgMIHl5BawOxRkcXxjB51gDQU3B0_4-1722447484-1.0.1.1-8j7myMuOA6K_ACD.DPC46PPTiNexwzpXGsBnyN6obuee.OmBGsp1dT9RtAL75MmKCLmv9IX1jsqRtNuR2f7qPQ; path=/; expires=Wed, 31-Jul-24 18:08:04 GMT; domain=.squareupsandbox.com; HttpOnly; Secure; SameSite=None [Server] => cloudflare ) body: Array ( [0] => Square\Models\Error Object ( [category:Square\Models\Error:private] => AUTHENTICATION_ERROR [code:Square\Models\Error:private] => UNAUTHORIZED [detail:Square\Models\Error:private] => This request could not be authorized. [field:Square\Models\Error:private] => ) ) CONTEXT: {"_legacy":true} 2024-07-31T17:38:04+00:00 Notice Could not retrieve business locations. Additional context

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @lpjjonine

    Thanks for sharing the log.

    From the log you’ve shared, it looks like authorization errors are occurring when trying to connect to Square. This issue is often due to incorrect credentials or permissions.

    Since you’re logged in with the owner’s account, the credentials should be correct. Therefore, it’s possible that the Square account might not have the necessary permissions set for WooCommerce to access it.

    Please disconnect your Square account and head over to WooCommerce → Status → Tools, and do the following:

    • WooCommerce transients – Clear
    • Expired transients – Clear
    • Clear template cache – Clear
    • Capabilities – Reset Capabilities
    • Clear customer sessions -Clear
    • Product lookup tables – Regenerate
    • Regenerate the product attributes lookup table – Regenerate

    Next, please clear your browser cache and reconnect your Square account. Ensure that WooCommerce is allowed to access it while connecting.

    Additionally, if you’ve added sandbox mode via constant, make sure to remove it. More info: https://woocommerce.com/document/woocommerce-square/troubleshooting/#section-8

    The error message about not verifying the domain with Apple Pay is likely unrelated to the connection issue with Square, especially if you’re not planning to set up Apple Pay. However, if you want to resolve this, you must set up Apple Pay in the Square account settings.

    I hope this helps! If you have any other questions or need further assistance, please don’t hesitate to ask.

    Thread Starter Peggy

    (@lpjjonine)

    Thank you so much Shameem, I tried what you said but that didn’t fix it. I have tried a default them and deactivated every plugin except Woocommerce and Woocommerce Square plugins and it still won’t connect. In further troubleshooting I have Gravity Forms on the site and added the Square addon to that and was able to sucessfully connect to Square. Is there any kind of issue with the plugins that would be causing this?

    This is what shows in the log –

    2024-08-08T21:05:56+00:00 Notice Access token successfully received. Additional context{ “_legacy”: true } 2024-08-08T21:05:56+00:00 Notice Refresh token successfully received. Additional context{ “_legacy”: true } 2024-08-08T21:05:57+00:00 Notice Authorization error occurred, attempting a refresh. Additional context{ “_legacy”: true } 2024-08-08T21:05:57+00:00 Notice Disconnected due to invalid authorization. Please try connecting again. Additional context{ “_legacy”: true } 2024-08-08T21:05:57+00:00 Notice Request Request

    And this –

    [0] => Square\Models\Error Object ( [category:Square\Models\Error:private] => AUTHENTICATION_ERROR [code:Square\Models\Error:private] => UNAUTHORIZED [detail:Square\Models\Error:private] => This request could not be authorized. [field:Square\Models\Error:private] => )

    Does this give any insight as to why I can’t get Woocommerce to connect?

    Plugin Support Zubair Zahid (woo-hc)

    (@doublezed2)

    Hello Peggy,

    Thank you for your reply.

    I understand you tried the steps we suggested but you are still getting an error.

    Since this is an error related to authorization, have you contacted Square support?
    They might be in a better position to shed some light on the problem.
    I want to make sure there is no problem with the account on the Square’s end.

    Looking forward to your response. ??

    Best regards.

    Thread Starter Peggy

    (@lpjjonine)

    I did contact Square Support and there was nothing on their end causing the problem and also being that I was able to connect Gravity Forms to Square with no problem makes me think everything is fine with Square.

    Thread Starter Peggy

    (@lpjjonine)

    I ended up buying a paid plugin called WC Shop Sync to connect Woocommerce to Square and it worked right away.

    Hey, @lpjjonine!

    I’m glad to know it is working ??

    Having said that, it is not expected to need another plugin to connect, the WooCommerce Square should connect by it self.

    Do you want to keep troubleshooting this to figure out what is going on? We will be happy to continue helping you on this.

    Looking forward to your reply.

    Have a wonderful day!

    Hello, we are experiencing the exact same problem as the original poster here. We do not want to install yet another plugin to attempt to resolve it.

    All our development has worked fine connecting to Square in Sandbox mode, syncing products and making test purchases, but now we are unable to switch WooCommerce Square to use production by connecting to Square.

    Under WooCommerce > Settings we choose Production from the Environment Selection dropdown, and then we click the blue Connect to Square button.

    After logging in with our Square owner user credentials, we receive a message that says “You just authenticated Square!” But when we click the purple button to return to WordPress, the settings have reverted to the Sandbox values and there are no fields available to enter Production tokens or other information. Choosing Production from the dropdown again just repeats these same steps.

    In the Square logs we see the error “Could not retrieve business locations”?against the?/v2/locations?endpoint, and authentication errors against the?/v2/customers/**?endpoint. There is no suggestion we can find in your documentation as to how to resolve this, or what to do differently here.

    We have double-checked that the Square account we are using is the Owner. The Square account has been working for several years, accepting payments successfully. It has a valid location configured. There is nothing wrong with the Square account that we can tell. The issue seems to be on the WooCommerce Square side.

    It is extremely urgent that we get this issue resolved: a project involving months of sandbox work and testing cannot be launched due to this issue. I have opened a support ticket with Woo Support and received only an AI-generated response which tells me to keep repeating these same steps above that do not work.

    Thank you.

    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @garyesmith

    Since you’ve created a ticket with us, one of our Happiness Engineers will get you back soon. There’s no need for you to create a new thread or post your query here. If our AI bot has already responded to you, reply to reopen the ticket.

    I hope this provides some clarity. Please let us know if you have any other questions!

Viewing 15 replies - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.