#ShaunBaker - Payment Element

1 messages · Page 1 of 1 (latest)

onyx root
#

Hello! What bug are you seeing?

undone ember
#

So we have card, klarna on the Payment Element

#

User enters name and email - hits submit

#
"message": "Invalid email address: shaun@w.com "
"type": "invalid_request_error"
#

Theres a trailing space and breaks

onyx root
#

What happens if you remove the trailing space at the end?

undone ember
#

It works

#

Oh wait

#

So the card tab has validation against the fields - eg incorrect card number

#

The Klarna tab has no validation in the element itself at all

#

Eg if you submit with empty fields - no error

#

Is this expected behaviour?

#

Aside from that - is there no way to pre-populate these fields - eg the paymentIntent has a customer associated with it - or our website has a known user...

onyx root
#

There's not currently a way to pre-populate the fields, but I believe that's something that's being considered.

#

Regarding the Klarna tab, can you provide more information about what you mean? Are you saying the email and name fields in the Payment Element can be blank and it will still work?

undone ember
#

Nope - if blank they stay blank - no error messages

#

Let me screenshot

#

Card Tab

#

Klarna tab

#

This is after hitting submit on both

#

Eg Ive hit submit when either tab is selected

onyx root
#

Ah, okay, I see what you mean. This is inconsistent behavior and I can flag internally so we can get this fixed.

undone ember
#

It does bubble up outside - but then the message is away from the fields so a tad undesirable

#

And please - the trailing spaces 😉

onyx root
#

Yep, for sure.

undone ember
#

And pre-pop

#

This is 1000x better than what we had before though with mixed implementations with Stripe/Klarna - so this is fantastic

onyx root
#

That's great to hear!