I’m using mobile-payments-sdk-react-native
getting error: Authorization error: {“code”:“AUTHENTICATION_ERROR”,“message”:“The server returned an unexpected response, please try again later.”,“domain”:“SquareNetworkingErrorDomain”,“userInfo”:{“SQLocalizedTitleKey”:“Invalid Response”,“errorMessage”:“The server returned an unexpected response, please try again later.”,“errorCode”:1001,"NSLocali
import colors from "@theme/colors";
import { Button, Text, VStack } from "native-base";
import asRoute from "src/utils/withRoute";
import { authorize } from "mobile-payments-sdk-react-native";
import React from "react";
import Header from "src/components/headers/Header";
import { fontSizes } from "@theme/typography";
function Index() {
const initializeSDK = async () => {
try {
let authorizedLocation = await authorize(
"EAAAl06DVOYKGd9K…….",
"LNM9KV0….."
);
console.log(
"SDK Authorized with location " + JSON.stringify(authorizedLocation)
);
} catch (error) {
console.log("Authorization error: ", JSON.stringify(error));
}
};
return (
<VStack flex={1} bg={colors.bg}>
<Header title="Square Payment Integration" type="normal" />
<VStack px={4} py={4} space={5}>
<Text fontSize={fontSizes.md} color={colors.white}>
Square Payment Integration
</Text>
{/\* Initialize SDK Button \*/}
<Button onPress={initializeSDK}>Initialize SDK</Button>
</VStack>
</VStack>
);
}
const examplesScreen = asRoute(Index, "examplesScreen", {
title: "Home",
animation: "slide_from_right",
});
export default examplesScreen;```