#gyungi - Terminal
1 messages ยท Page 1 of 1 (latest)
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
Have you followed the instructions on this page? https://stripe.com/docs/terminal/payments/setup-integration
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
๐ stepping in
Agree that you can ignore fetchConnectionToken and unexpectedDisconnect for now. But StripeTerminal is red means there is still issue with setup
Yup! On board with that
Did you have this line?
<script src="https://js.stripe.com/terminal/v1/"></script>
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
Can you follow the instruction from Github here: https://github.com/stripe/terminal-js#installation
awesome I think this is what I need! Thanks so much, I really appreciate it ๐