#boss-amp_code

1 messages ยท Page 1 of 1 (latest)

trail eagleBOT
#

๐Ÿ‘‹ 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.

steep hamlet
#

๐Ÿ‘‹

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 ?

rancid comet
#

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

steep hamlet
#

You want to use Tap to Pay with your Sunmi device or what exactly ?

#

You need to run the Android app in your Sunmi device

rancid comet
#

and I have the application running on sunmi

steep hamlet
#

discoveryMethod: 'internet',
You need to use TapToPayDiscoveryConfiguration and not internet

#

have you had the chance to walkthrough the guide I shared step by step ?

rancid comet
steep hamlet
#

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 ?

rancid comet
#

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

steep hamlet
steep hamlet
rancid comet
#

in debug will it allow me to find the reader if it is not simulated?

steep hamlet
#

yes

#

simulated is used when you don't have a reader and you want to test the Stripe Terminal SDK

rancid comet
#

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

steep hamlet
#

What guide are you following ?

const supportsTapToPay = await Terminal.supportsReader('tap_to_pay');
From where you got this line ?

rancid comet
#

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 />;
}

steep hamlet
rancid comet
#

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."}}

steep hamlet
#

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.

rancid comet
#

ok