#boss-amp_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/1366749205313355786
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- boss-amp_code, 29 minutes ago, 17 messages
- boss-amp_code, 15 hours ago, 56 messages
- boss-amp_code, 17 hours ago, 9 messages
๐
but after issuing realase I can't find the reader. as simulated I could go through the entire payment
You mean in test mode you were able to discover the reader while in live mode no ?
yest
useEffect(() => {
(async() => {
const { error } = await discoverReaders({
discoveryMethod: 'internet',
simulated: false,
});
if (error) {
console.error('Error discovering readers:', error);
}
})();
}, [discoverReaders]);
when I change it to simulated to true it works
You want to use Tap to Pay with your Sunmi device or what exactly ?
For tap to pay here's how you need to discover your reader:
https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=android&reader-type=tap-to-pay#discover-readers
You need to run the Android app in your Sunmi device
discoveryMethod: 'internet',
You need to useTapToPayDiscoveryConfigurationand not internet
have you had the chance to walkthrough the guide I shared step by step ?
this one
this is my code
No need to share all the file
I see that you've updated the configuration to taptopay, good.
Now what issue you are seeing ?
Any particular error/stacktrace ?
Well, when I release the apk I can no longer log errors.
because in debug mode it won't find the reader, so I'm making a release
You shouldn't release the APK yet, you should use the debug apk
Why? you can discover in test mode with a debug apk
in debug will it allow me to find the reader if it is not simulated?
yes
simulated is used when you don't have a reader and you want to test the Stripe Terminal SDK
useEffect(() => {
const discover = async () => {
try {
addLog('๐ Checking if device supports Tap to Pay...');
const supportsTapToPay = await Terminal.supportsReader('tap_to_pay');
if (!supportsTapToPay) {
addLog('โ Device does NOT support Tap to Pay.');
Alert.alert('Device Unsupported', 'Your device does not support Tap to Pay.');
return;
}
addLog('โ
Device supports Tap to Pay!');
addLog('๐ Starting reader discovery (tapToPay)...');
const { error } = await discoverReaders({
discoveryMethod: 'tapToPay',
simulated: false,
});
if (error) {
addLog(`โ Error during discoverReaders: ${error.message}`);
Alert.alert('Discovery Error', error.message);
} else {
addLog('โ
discoverReaders finished successfully.');
}
} catch (e: any) {
const errorMessage = e?.message || 'Unknown error during discovery.';
addLog(`โ Critical error during discovery: ${errorMessage}`);
Alert.alert('Critical Error', errorMessage);
}
};
discover();
}, [discoverReaders]);
LOG 14:45:09 โ ๐ Checking if device supports Tap to Pay...
LOG 14:45:09 โ โ Critical error during discovery: Cannot read property 'supportsReader' of undefined
What guide are you following ?
const supportsTapToPay = await Terminal.supportsReader('tap_to_pay');
From where you got this line ?
export default function DiscoverReadersScreen() {
const { discoverReaders, discoveredReaders } =
useStripeTerminal({
onUpdateDiscoveredReaders: (readers) => {
// The readers variable will contain an array of all the discovered readers.
},
});
useEffect(() => {
const { error } = await discoverReaders({
discoveryMethod: 'tapToPay',
});
}, [discoverReaders]);
return <View />;
}
Here are the guides that you need to follow one by one:
There is no mention to this line :
Terminal.supportsReader('tap_to_pay');
In that guide.
ok, it's my fault because I was thinking about something because I had such errors before
LOG 14:48:54 โ ๐ Starting discoverReaders with tapToPay...
LOG 14:48:54 โ โ Error during discoverReaders: Debuggable applications are not supported in the production version of the Tap to Pay reader. Please use a simulated version of the reader by setting DiscoveryConfiguration.isSimulated to true.
LOG [Stripe terminal]: didFinishDiscoveringReaders {"error": {"code": "INTEGRATION_ERROR.TAP_TO_PAY_DEBUG_NOT_SUPPORTED", "message": "Debuggable applications are not supported in the production version of the Tap to Pay reader. Please use a simulated version of the reader by setting DiscoveryConfiguration.isSimulated to true."}}
I'm not very familiar with Sunmi devices, but you need to use a test debug version and not production version on your device
It seems like the Sunmi device supports only production usage. Try to reach out to the manifacture (or their community) and ask them how to run debug app on it.
ok