#ceo_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1268211080069517342
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Here is the error we get
What we are doing wrongly?
@echo dew
we can provide you with screenshots, code, error logs, anything you need just to help us to get the stripe to pay working
Hello, can you send me the snippet of code that is being called when you get this error?
const { discoverReaders, discoveredReaders, cancelDiscovering, connectInternetReader } =
useStripeTerminal({
onUpdateDiscoveredReaders: (readers) => {
console.log(">>>> readers:", readers)
// The readers variable will contain an array of all the discovered readers.
},
onDidChangeConnectionStatus: (status) => {
// access to the current connection status
console.log(">>>> status:", status)
},
});
useEffect(() => {
console.log('Starting reader discovery...')
const discover = async () => {
// console.log('Calling discoverReaders...')
const { error } = await discoverReaders({
discoveryMethod: 'localMobile',
simulated: true, // false gives an error
})
if (error) {
console.log('Error discovering readers:', error)
} else {
console.log('discoverReaders called successfully.')
}
}
discover();
return () => {
console.log('Cancelling reader discovery...')
cancelDiscovering()
}
}, [discoverReaders, cancelDiscovering])
@echo dew please check above
Ah it looks like you may be running in to permissions errors around tap to pay. Can you verify that you have the proper settings in your build file? https://docs.stripe.com/terminal/payments/setup-reader/tap-to-pay?platform=ios&terminal-sdk-platform=react-native#get-started
@left needle
@echo dew I made that setting but when I started building from xcode on an real iphone device. I receive this error. Why?
Apologies for dropping off of this thread. Looking in to this
If you haven't already, can you try cleaning and rebuilding? Not sure if the old settings could have been cached here
Same error, after cleaning and rebuilding
Gotcha, I am still having trouble finding more info on this. I passed the question along to my colleagues and will get back to you with what we can find.
๐
You set these provisions/entitlements in your Apple Developer profile and then you need to add them under the Signings & Capabilities when you open your project in Xcode
Those docs link out to https://developer.apple.com/documentation/proximityreader/setting-up-the-entitlement-for-tap-to-pay-on-iphone?language=objc which walks you through how to do this