Nop Version: 4.10
Plugin Version: 1.21
So if sandbox selected in the configuration for [Nop.Plugin.Payments.Square] Payment plugin we have a sandbox prefix check for [Sandbox access token].
Tried to configure the payment method with sandbox enabled for initial testing and was getting the following error after saving the Sandbox app id and Access token (Had to add prefix [sandbox-] to the token, I got from SqureUp to save the info back to DB:
Square payment error: Error calling ListLocations: {"errors":[{"category":"AUTHENTICATION_ERROR","code":"UNAUTHORIZED","detail":"This request could not be authorized."}]}.
Tried for at least an hour with no success (Debugging and stuff for no reason :) ).
So updated the token while debugging (Just removed the added prefix after [CreateApiConfiguration]) and it started getting the Locations from API.
So do we need to remove the sandbox- prefix check to get payment method working in sandbox mode, Or am I Missing something?