From quickstart project template to my app integration

Hello! I have successfully setup the quickstart project template running at http://localhost:3000/ and verified payments in my Default Test Account.

I now want to include the payments form in my application located at (example) http://localhost/myapp/

The payment form renders, but fails to process payments. The console shows a 404 for square.js. and the payment-status-container renders “Payment Failed”

I’ve tried several approaches and searched for info with no success as yet.

Thank you.

Are you getting any console errors? If I had to guess I’d say that your application isn’t able to find the CreatePayment function /payment in the server.js. You’ll want to make sure the path to /payment is correctly configured. :slightly_smiling_face:

Hello Bryan,

Thank you for your prompt response.

In response to “Are you getting any console errors?”

In response to your advice to “You’ll want to make sure the path to /payment is correctly configured.”

This is what is found in server.js

Screen Shot 2022-09-07 at 1.28.00 PM

Is this configuration correct? I have not changed it from the original clone of the quickstart repo.

Do you have a screenshot of the console errors? :slightly_smiling_face:

Great, thanks! The issue is that the path to /payment isn’t found in the server that you’re using. Have you tried putting in the full file path to /payment? :slightly_smiling_face:

Would that be done in the server.js file or elsewhere?

Also, I do not see a “payment” file or folder, so what would the path be?

What port is your environment using with your app? :slightly_smiling_face:

My site does not require a port designation in the url. I assume it runs on port 80.

This still looks to be a file path issue. Did you change any of the file paths when you added the Web Payments SDK to your application? :slightly_smiling_face:

No I have not changed any of the file paths. Where should I look to verify that?