#irishman-sample
1 messages · Page 1 of 1 (latest)
Node
obvious question I suppose, is the server actually running(npm start in a terminal window) and you are visiting http://localhost:4242/checkout.html to trigger things?
my other guess is maybe you toggled between "Prebuilt Checkout page"and "Custom payment flow" at some point and the backend you're actually running has the Checkout code instead of the PaymentIntent code
No obvious questions, I'm as much of a newbie as you can be with these sort of things 😆 But I'm happy there are people out there like you willing to teach me.
So I ran npm run dev (using next.js) and my website is up on localhost, not sure if that means the server is running or not bc I don't really even know what a server is honestly.........
Checkout.html does not exist and is therefore not found.
I am only following the Custom Payment Flow.
if you're a beginner you probably want to use Checkout and not the other flow(or use a no-code option https://stripe.com/docs/payments/no-code )
Checkout.html does not exist and is therefore not found
thinking..
I will look into it if I can't find a solution but I'm using this as an opportunity to learn so I'm glad its giving me a headache.
This is the code for the payment intent fetching and creation.
we include that in the sample though.
yep that is our sample code
ok so you're using the react frontend
then localhost:3000/checkout is the page to start with. I assume that's where you are?
I'm trying to implement your sample into my own website so I'm not using your checkout page or your App.js. This is my file structure:
So it's a nonprofit and the payment section is within localhost:3000/donate
do you have a backend developer to work with?
Just me
you said you don't know what a server is and that's kind of important to know. That structure just looks all frontend to me, you need an actual Node server running that the server.js code would go into. It's a full-stack integration to integrate Stripe this way and you need some front and back end development experience.
I'd start by getting the standalone example to work first before you start putting the code into your own website.
for example I don't think you can just copy our server.js in your existing project like that and have it work, you presumably already have a Next.js server with some routes setup
you 'd have to modify wherever that is configured to include a PaymentIntent route.
Yeah I thought(hoped) just having the server.js file identical to the sample one would be enough but it makes a lot more sense that I need my own server. I'll spend some time learning about back end and node to make the integration easier.
Thank you so much for your time, if you have any recommendations of where to start or any resources for me to get started learning I would appreciate that a lot. You think I should work with next rather than express?