[Nop.Plugin.Payments.Square] do we need to remove the sandbox prefix check.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 лет назад
Hey guys, Greetings,

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?
4 года назад
Can you solved this problem?
4 года назад
Hello
Nop Version: 4.20
Plugin Version: 1.33
I am getting same error in nopCommerce 4.20

https://prnt.sc/rclwkj


Square payment error: Error calling ListLocations: {"errors":[{"category":"AUTHENTICATION_ERROR","code":"UNAUTHORIZED","detail":"This request could not be authorized."}]}.
4 года назад
We'll check it. Here is a work item
4 года назад
I could not reproduce the problem on the 4.30 version with the 1.46 plugin version. You must make sure that you are using the correct sandbox application id and sandbox access token.
4 года назад
Also must make sure that you are using the latest API version in your square application.
3 года назад
This is still a problem in 1.48.

PaymentInfo.cshtml always uses the sandbox JS link.


@{
    Layout = "";
    Html.AddScriptParts(ResourceLocation.Footer,
        squarePaymentSettings.UseSandbox ? SquarePaymentDefaults.SandboxPaymentFormScriptPath : SquarePaymentDefaults.SandboxPaymentFormScriptPath,
        excludeFromBundle: true);
}

Should be:
@{
    Layout = "";
    Html.AddScriptParts(ResourceLocation.Footer,
        squarePaymentSettings.UseSandbox ? SquarePaymentDefaults.SandboxPaymentFormScriptPath : SquarePaymentDefaults.PaymentFormScriptPath,
        excludeFromBundle: true);
}
3 года назад
abssd wrote:

...
PaymentInfo.cshtml always uses the sandbox JS link.
...


Thanks. Work item here.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.