#fatcat-elements-loaderror

1 messages ยท Page 1 of 1 (latest)

rain tartanBOT
restive grove
#

@glossy plinth the first step is to read the errors and understand what the issue is. There has to be logs or similar. Sorry right now there's nothing for me to even guess a wild idea

#

fatcat-elements-loaderror

glossy plinth
#

I figured it out, I forgot to add the index file remix needs for stripe

#

while I have you, is there any way to pre-fill the zip code and country if I already know it?

glossy plinth
#

country is 2 letter or 3 letter code?

#

I tried putting it in here but it doesn't work

#

Error: Received unknown parameter: defaultValues

restive grove
#

yeah that's a completely different API

glossy plinth
#

๐Ÿ˜“

restive grove
#

my link is about PaymentElement that you initialize client-side with Elements. Your picture is about server-side code

glossy plinth
#

yeah because I'm using remix

restive grove
#

The picture you showed earlier is client-side where your code will, in Javascript, load Stripe.js, initialize Elements (our UI library) and then create a PaymentElement.
The second picture with code is server-side in Node.js where you create a PaymentIntent.

The defaultValues option I shared earlier goes client-side

glossy plinth
#

oh so in here? the options?

restive grove
#

try it I'd say and see what happens

glossy plinth
#

Didn't work but I found the solution

restive grove
#

๐Ÿ‘

glossy plinth
#

one level deeper is the payment element, you pass it to that

restive grove
#

ah yeah makes sense

glossy plinth
#

sorry am noob

#

thank you for your help koopa