Viewing 2 replies - 1 through 2 (of 2 total)
  • madeincosmos

    (@madeincosmos)

    Automattic Happiness Engineer

    Hi @dineshinau,

    Sandbox mode in the WooCommerce Square plugin is still experimental, that’s why there’s no option in plugin settings to switch to sandbox yet and instead it requires a custom code snippet.

    Having that said, the Unauthorized error you’re seeing is a side-effect of automatic token renewal added in plugin version 2.0.5. Our developers are aware of this problem, and are currently discussing what will be the best long-term solution here.

    As a temporary workaround, you can edit the file includes/API.php in plugin code and change the line 65 from this:

    
    		if ( $is_sandbox ) {
    

    to this:

    
    		if ( $this->get_plugin()->get_settings_handler()->is_sandbox() ) {
    

    Or you can download a hijacked plugin version that includes this hack from here: https://cld.wthms.co/rX7SQQ

    I’m using this hack on all my test sites and I can process sandbox payments without any problems.

    Hope that helps!

    • This reply was modified 4 years, 6 months ago by madeincosmos.
    Plugin Support Elvira K. a11n

    (@treibalen)

    Hi there @dineshinau,

    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 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sanbox mode showing ‘UNAUTHORIZED’ error in console’ is closed to new replies.