#cate_block
1 messages · Page 1 of 1 (latest)
hello! to clarify, you downloaded the quickstart example, attempted to run it as it is, and ran into that error?
no, I copied the codes from the link
Hi @finite moth Did you include Spark in your project dependency?
https://github.com/stripe-samples/accept-a-payment/blob/main/payment-element/server/java/pom.xml this is how the example code integrate spark through maven
yes I added it to my dependency and was able to import it in class like this
import static spark.Spark.*;
OK, do you know at which line was the error thrown from?
error from the logs is this
java.lang.NoSuchMethodError: org.eclipse.jetty.server.Request.setAsyncSupported(ZLjava/lang/String;)
not sure the specific line, this is what I got more from, the logs:
Spark has ignited ...
Look like the internal dev server jetty encountered problem
https://github.com/stripe-samples/accept-a-payment/tree/main/payment-element can you clone the sample code from this github repo and and see if you are still getting error when running the project?
the page is giving me this error when I load the card payment
{
"code" : 500,
"message" : "There was an error processing your request. It has been logged (ID 4189c0bdecd6de45)."
}
will check the repo
this link right? https://github.com/stripe-samples/accept-a-payment/blob/main/payment-element/server/java/src/main/java/com/stripe/sample/Server.java
Yes but I'd suggest you clone the whole project, not cherry pick the files
we have a React SDK if that's what you're looking for : https://github.com/stripe/react-stripe-js