#mayadelasriveras

1 messages · Page 1 of 1 (latest)

odd bronzeBOT
boreal isle
#

Hi there 👋 how can we help?

zinc hinge
#

when I run on my localhost it returns call error in a json

boreal isle
#

Can you provide more details? Where does the error appear? What is the actual error message? What are you trying to do?

zinc hinge
#

i / Fetches a payment intent and captures the client secret
async function initialize() {
const { clientSecret } = await fetch("stripe.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ items }),
}).then((r) => r.json());

#

you there

#

Uncaught (in promise) SyntaxError: Unexpected end of JSON input
at stripe.js:22:20
at async initialize (stripe.js:18:28)

#

i need integrated

#

element payment

#

hello

boreal isle
#

Which line is throwing the error?

zinc hinge
#

this file .js the front is error

#

body: JSON.stringify({ items }), this line

#

there

#

i no can display form

#

only pay button

boreal isle
#

I believe you need to specify a key-value pair here, similar to:
body: JSON.stringify({ someKey: items })

zinc hinge
#

please i need what key

#

i need example

#

i not can display form complete

#

there is

#

what is the problem no can display form the fron end

boreal isle
#

That is an example

#

What happens when you change the syntax to what I showed you above?

zinc hinge
#

ok i need implement this front i no can

#

VM86:1 Uncaught (in promise) SyntaxError: Unexpected end of JSON input
at stripe.js:22:20
at async initialize (stripe.js:18:28)

#

this error