#slowgen-payment-element-loader

1 messages ยท Page 1 of 1 (latest)

dense leaf
bold rain
#

There's an on-Ready event from the paymentElement:

      <PaymentElement
        onReady={handleReady}
        options={{ business: { name: COMPANY_NAME } }}
      />
#

you can use that to load and unload a loading icon or animation

#

(I do)

#

(Also, usual disclaimer: NOT with Stripe)

chilly galleon
#

@dense leaf Thanks, @bold rain appreciate it

#

That looks like some react, how would I use that in vanilla JS

dense leaf
#

@chilly galleon The docs I linked above has an example in JS

chilly galleon
#

Cheers

#

Would this be the right way to use it

#

doesn't seem to trigger

dense leaf
#

The code looks correct
I'd add some more logging to see if you can see events in your console

chilly galleon
#

Ye events are logging, other things work onready.

#

Thanks for the pointers

#

Sorted it was the div that wasn't hiding the inner element for some reason. Cheers again

dense leaf
#

Nice! Glad that worked ๐Ÿ™‚

chilly galleon
#

When confirming a paymentIntent if I pass billing_details.phonein the billing_details object it doesn't show in the dashboard. Is it not meant to show. The rest e.g. email, name, address show

dense leaf
#

can you share an ID for the payment_intent just in case? I'm unsure if the dashboard uses information from the customer object or the payment_intent
where are you trying to look for this information?

chilly galleon
#

pi_3KUGjuG6IeRpDPne1W7hkkx0

#

I normally see it in the dashboard by clicking on the payment

dense leaf
#

Payment Element would do it automatically if necessary.

chilly galleon
#

My only concern is finding a payment with the right name in the dashoard if that data isn't collected. Do you know if that's always collected or the data is taken from elsewhere

dense leaf
#

Apologies for the delay
juggling between a few threads.

dense leaf
#

As far as I can tell, the dashboard will show the email or name as long as it is associated with a customer. If its a "guest" customer, then it won't show the name in the list