#Mariukas - test card exception
1 messages · Page 1 of 1 (latest)
for successfull payment: 4242424242424242
And the other card numbers work here?
and other card numbers doesn't work.
Ah I see. Can you send me the code that is throwing this exception?
And this is nodejs express server
const stripe = Stripe(PRIVATE_KEY, { apiVersion: "2020-08-27" });
backend.post("/create-payment-intent", async (req, res) => {
try {
const paymentIntent = await stripe.paymentIntents.create({
amount: 1099,
currency: "eur",
payment_method_types: ["card"],
});
const clientSecret = paymentIntent.client_secret;
res.json({
slientSecret: clientSecret,
});
} catch (e) {
console.log(e.message);
res.json({ error: e.message });
}
})
backend.listen(port, "192.168.1.101", () => console.log(`server running on http://192.168.1.101:${port}`));
Do you know where exactly in the client code the exception is being thrown?
When I use onChange={value => setEmail(value.nativeEvent.text)} I get this error.
But when I use just onChange={value => setEmail(value)} I get this error:
So I think there is the problem?
And what is your setEmail function doing with that value?
Also are these three different errors? For the first one it sounds like paymentIntentClientSecret was not set, which means you should check in to if your fetching function is actually fetching it properly
setEmail function sets the email for billing details. And also checks in email input field is there was set an email adress.
i'm fetching to test is it working and I think so I misspelled somewhere or it have to be like that? It should be clientSecret?
omg...
It doesn't worked, because I misspelled.
Thank you for your patience... I fixed that. Have a nice day :)