#Monkey D. Luffy
1 messages · Page 1 of 1 (latest)
hi! can you share the full code and the full error message?
can you share the full code you're using?
const ConnectDevice = async () => {
const StripeTerminal = await loadStripeTerminal();
const token = await fetchConnectionToken();
console.log("token", token);
console.log("StripeTerminal", StripeTerminal);
var terminal = StripeTerminal.create({
onFetchConnectionToken: await fetchConnectionToken(),
onUnexpectedReaderDisconnect: unexpectedDisconnect,
});
console.log("terminal", terminal);
};
onFetchConnectionToken: await fetchConnectionToken(), is not correct
as the error message says, you must "pass a function"
so it's onFetchConnectionToken: fetchConnectionToken, instead. You pass the function, not the result of calling the function.
Can you adjust the code and share here? Thanks
Did you try to connect to a reader?
if not it's normal for it not to be connected of course.
What guide are you following?
Yeah I will try to connect to the reader
cool
read the guide and follow the steps