#gyungi - Terminal

1 messages ยท Page 1 of 1 (latest)

lusty saddle
#

Hello! Can you provide more details about the issue you're having?

deft heron
#

Definitely! I was just looking through the example to get set up with StripeTerminal and it appears in the example code like this:

#

but when I try and copy paste this code into my own file it tells me StripeTerminal is undefined, which makes sense because I'm not importing it from anywhere. When I try to import it from the node Stripe package, it says it's not an exported member

lusty saddle
deft heron
#

Yup! That's the page I've been staring at- when I get to step 3 and am trying to construct the StripeTerminal object is where I'm having problems

#

For reference, this is what I have now- I haven't written a fetchConnectionToken function or an unexpectedDisconnect function so those make sense, but the StripeTerminal object is giving an error as well

restive juniper
#

๐Ÿ‘‹ stepping in

#

Agree that you can ignore fetchConnectionToken and unexpectedDisconnect for now. But StripeTerminal is red means there is still issue with setup

deft heron
#

Yup! On board with that

restive juniper
#

Did you have this line?

<script src="https://js.stripe.com/terminal/v1/"></script>
deft heron
#

So I'm a relatively new developer and as I understand it because I'm operating in React, I don't have an index.html file; I'm using yarn as a package manager and I've added stripe to my package.json file

#

I also tried adding that line to my _app.tsx file and that didn't seem to do anything

restive juniper
deft heron
#

awesome I think this is what I need! Thanks so much, I really appreciate it ๐Ÿ™‚