#irishman-sample

1 messages · Page 1 of 1 (latest)

stoic forge
#

@west hornet which backend language are you using?

west hornet
#

Node

stoic forge
#

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

west hornet
#

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.

stoic forge
#

Checkout.html does not exist and is therefore not found
thinking..

west hornet
#

This is the code for the payment intent fetching and creation.

stoic forge
#

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?

west hornet
#

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

stoic forge
#

do you have a backend developer to work with?

west hornet
#

Just me

stoic forge
#

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.

west hornet
#

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?