Problem with const paymentresponse - File not found

Followed the instructions for web-payments-quickstart and everything went great. Got the green checkmark. Continued with the instructions to deploy to production and the following is the problem: const paymentResponse = await fetch(‘/payment’, {
method: ‘POST’,
headers: {
‘Content-Type’: ‘application/json’,
My console gave me this error:
payment error

Triple checked my production settings. Still the same.

Looks like I’m missing something
Thank You

Hey @wizard2475! The quickstart relies on some dependencies for that fetch to properly connect to the project’s backend. In production, are you using the same stack as the quickstart project is? If so, can you verify if the dependencies are installed correctly?

Please also note that the Web Payments SDK quickstart is set up as Node project, but Square is not opinionated about what you use for your backend. As long as you’re able to make HTTP requests and pass the payment token from your frontend to your backend, feel free to use whatever backend you’re comfortable with.

I may have missed some dependencies as I was moving kind of fast. My bad. Please send me the dependencies that I need. My app is hosted by GoDaddy. I do have terminal access.

I installed all the dependencies with composer. I added a payment file to the folder. I ran a card for $1.00 in production. I then received “Successful” with green checkmark. When I checked the dashboard There was nothing there. So I checked the developer dashboard and there was nothing there either. I double checked the credentials and everything was good. So where did the transaction go?
At my wits end here, please help

For the quickstart project, all dependencies can be found in the package.json. However, it sounds like you’re using PHP for your app. If that’s the case, these dependencies wouldn’t be relevant to you, as they’re for the Node-based quickstart project.

If you’re looking for a PHP example, I recommend checking out our PHP Payment example project on GitHub.