#godwynnn_code

1 messages · Page 1 of 1 (latest)

wraith loomBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1352736865223970836

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

split violet
#

so uhm

#

i need help

#

i verified

#

and stuff

#

but its like

#

not working

wraith loomBOT
#

@split violet looks like you're in the wrong place, this thread is for someone else's question.

Note that posting inappropriate messages in other people's threads is against the rules. No worries if this was just an honest mistake, but anyone who violates the rules multiple times will be removed from this server.

magic cloak
zealous bridge
#

seem the functionality on the documetation is for vanilla and not applicable on react or next

zealous bridge
#

"use client"
import React from 'react'
import { useEffect,useState,useRef,useLayoutEffect } from 'react'
import {Elements} from '@stripe/react-stripe-js';
import {loadStripe} from '@stripe/stripe-js';
import { PaymentElement } from '@stripe/react-stripe-js';
import { CardElement,CardCvcElement,CardExpiryElement,CardNumberElement } from '@stripe/react-stripe-js';

const stripePromise = loadStripe('********************')
function Payment() {
const [stripeData,setStripeData]=useState({})
const baseUrl='http://127.0.0.1:8000/'
const token="Bearer "
const options={
clientSecret:'
'
}
useLayoutEffect(()=>{
fetch(${baseUrl}vcard/ephemeral/keys,{
headers:{
'Authorization':token
}
}).then((res)=>res.json())
.then((data)=>{
setStripeData(data)
})

},[])
console.log(stripeData)

return (
<>
<Elements stripe={stripePromise} options={options}>

        <CardCvcElement/>

    </Elements>
</>

)
}

export default Payment

sorry i had to post the full snippet here for your review

wraith loomBOT
#

Hello @zealous bridge, we have sent you a direct message, please check it at https://discord.com/channels/@me/1352748654074662963

  • 🔗The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.