#Monkey D. Luffy

1 messages · Page 1 of 1 (latest)

tired tartanBOT
remote lava
#

hi! can you share the full code and the full error message?

wanton dust
remote lava
#

can you share the full code you're using?

wanton dust
#

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);

};

remote lava
#

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.

wanton dust
#

Can you adjust the code and share here? Thanks

remote lava
#

I did

#

onFetchConnectionToken: fetchConnectionToken

wanton dust
#

Yeah Updated but now its saying Not connected

remote lava
#

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?

wanton dust
#

Yeah I will try to connect to the reader

remote lava
#

cool

remote lava
#

read the guide and follow the steps