#milioli
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
Let's chat here
so.. I am triyng to use this:
const { discoverReaders, connectedReader ,discoveredReaders } = useStripeTerminal({
onUpdateDiscoveredReaders: (readers) => {
console.log(readers);
},
onDidChangeConnectionStatus: (status) => {
console.log(status);
}
});
try {
await discoverReaders({
discoveryMethod: 'localMobile',
}
);
} catch (error) {
Alert.alert('Error', `${error.code}: ${error.message}`);
console.log('Erro inesperado:', error);
}
};
But the app just crash and close
That's odd.
Are there any error messages/logs that you're seeing before/during the crash?
nothing...
Are you usnig React Native SDK?
"@stripe/stripe-terminal-react-native": "^0.0.1-beta.13",
Are you running the app on android or ios?
ios
Are you seeing the same behavior on android?
I am just using the ios
I am looking for React Native SDK docs. But I only found this:
https://stripe.com/docs/terminal/payments/connect-reader?reader-type=tap-to-pay
it seems that the docs are incorrect.
you can`t use this:
useEffect(() => {
const { error } = await discoverReaders({
discoveryMethod: 'localMobile',
});
}, [discoverReaders]);
as it is on the docs.
Let's take a step back
What readers are you working with?
What readers are you trying to integrate?
I am trying to use Tap to pay
For using tap to pay on iOS you need to first request entitlement from Apple
https://stripe.com/docs/terminal/payments/setup-reader/tap-to-pay?platform=ios#get-started
Once you configure the entitlement, you can follow the guide here
https://stripe.com/docs/terminal/payments/connect-reader
and here
https://stripe.com/docs/terminal/payments/collect-payment
Do I need the entitlement if I want to run it local In my simulator?
I believe so, yes
Hm.... maybe that is why it is crashing. For security reasons?
Yup most likely
Okay. Thanks