#eskimo - Elements customization

1 messages · Page 1 of 1 (latest)

pine palm
#

Hi there! Let me know how I can help clarify

junior sail
#

And I see const elements = stripe.elements({clientSecret, appearance});

#

Where does clientSecret come from?

pine palm
#

That should come from the response your server receives after creating or retrieving a PaymentIntent

junior sail
#

Ok, so I'm just using elements to createToken

#

So I don't want to have to query my server just to get something like that

#

I'm currently just initiating as elements = stripe.elements();

autumn merlin
#

Elements do NOT create tokens client-side...

junior sail
#

Well they do

#

Apparently

#

I just did it

#

Without needing a secret

autumn merlin
#

Elements use a secure iFrame to send data to Stripe's servers to create the information there, which is retrieved by your server (generally) as a paymentMethod

junior sail
#

That's what I'm using

#

That works, and is all fine and dandy

#

But for customizing the looks of it, it looks like i need to pass appearance

#

When creating the elements

#

But I'm not going to be passing a clientSecret

#

How do I do it?

autumn merlin
#

Ah. The deprecated token approach.

junior sail
#

Yeah the new approach is disgusting

#

This whole v3 setup is a huge downgrade imo

pine palm
#

Ah, I think I see the issue

junior sail
#

I'm really tempted to just go back to v2

pine palm
#

The Appearance API cannot be used with individual elements, only the PaymentElement

junior sail
#

Ughh

#

Ok

#

I really hope you guys dump this whole elements thing

#

It's cancer

autumn merlin
#

Personally, I'd recommend abandoning tokens altogether in favor of the SetupIntents/PaymentIntents.

junior sail
#

Well

#

Here's my opinion

#

It's terrible because 1, it looks like shit because they take time to load

#

2, having to query my server first just to get a secret just to send something to you, is garbage

#

3, the nightmare this is just to customize the look of it

#

This is a terrible bloated setup and has terrible UX

#

It's a huge downgrade

#

Maybe it helps noobs, but it makes it a pain for anyone that actually codes to do anything

#

I'm tempted to just use v2, but I know eventually you'll cut that off and I'll be forced to use this garbage anyway, so I feel like I have no choice

#

v2 is perfect

#

You're reinventing the wheel in an overcomplicated bloated way, it's really bad

pine palm
#

Please refrain from any unprofessional language in this channel.

#

Feedback is always welcome. Let's avoid any personal attacks and profanity.

junior sail
#

I didn't attack anyone personally

#

I just said that the elements thing helps noobs

#

Not referring to whoever this person is

#

Anyway

#

I tried

#

Back to v2 for me