#bird-paymentelement-confirm

1 messages · Page 1 of 1 (latest)

rigid dragonBOT
errant pawn
#

Yeah I think you're mostly completely misunderstanding the integration here

violet otter
#

yikes

errant pawn
#

If you use CardElement (which is legacy) you already have card details, it makes no sense to call confirmPayment() at step #5

#

Like the canonical integration path is
1/ Create a PaymentIntent first
2/ Collect card details in PaymentElement and confirm the PaymentIntent client-side at the same time

violet otter
#

yea, I had a dev here suggest that. When we did though, the amounts were never correct because the user selects the quantity.

#

if card element is legacy what should I use? I'm trying to upgrade from the 2018 api

errant pawn
violet otter
#

Actually, Karbi earlier said to do this with the confirm payment?

errant pawn
#

Karbi likely said what to do based on what you asked mostly.

violet otter
#

alright, I'm ditching the card element...

errant pawn
#

you don't have to, there are ways

violet otter
errant pawn
#

I'm just struggling to help you without understanding what you are building

violet otter
#

hey no prob, you helped me a few years ago on this:

#

So, I've commented out the payment element so you can see. It's like the simplest thing imaginable.

#

for an analogy,imagine each tweet costs five bucks. You choose how many tweets you want to do. that's all. It's not a multistep form or anything

errant pawn
#

PaymentElement is to collect card details. If you have already collected card details, then what are you trying to do

violet otter
#

this form would be like the first place someone enters card info. Does the twitter analogy help up above?

errant pawn
#

not really I don't get what twitter has to do with it, all I want is to grasp when/where you collect card details

#

if it's on the $5 screen then that's where you show PaymentElement

violet otter
#

yes. right now I'm facing a css issue or something. see the first image

errant pawn
#

Sure but that's something you'll debug on your end right? Like it's an element, you need to make sure you have the parent element with the right width/height and such

#

bird-paymentelement-confirm

violet otter
#

yea it's strange. seems to be some other bootstrap related post about this issue