Form Errors - Card Payments

Hello, I am relatively new at working with APIs and am trying to use the “Take a Card Payment” demo so I can get a bit better with this. [] Now I do have everything showing but I am getting the following error in the console when I submit the payment.

Here’s what I did…

  1. Downloaded repository from git and uploaded to directory.
  2. I do get the form to display on the page as you can see.
  3. When I enter the card info and submit, I get the error.

I am thinking it’s related to the paymentResponse function.

Here’s the page so you can take a look.

Hi @nyc2phx,

The error that you are getting is because the route to process the payment is configured. It cannot find this route on your server/webpage. Did you deploy the entire project including the backend or just the static portion of the project?

I am also facing the same issue.

Yep, that was it. Just a recommendation, setting up servers and what not to make things process is super complicated for the newer user trying to learn.

Just decided to dump all of that and use the API directly with CURL calls.

1 Like

@emmawade you’ll need to npm install the dependencies for it to work. I personally found just using CURL to interact with the API is much simpler.

1 Like

Agreed @nyc2phx After a couple of days trying to get npm and node.js coding to work on my development server I gave up and used the API/curl coding instead and managed to get a working solution.