#geekcorner_best-practices

1 messages ¡ Page 1 of 1 (latest)

proven juniperBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1281648233973678220

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

rigid zephyr
#

You would need to create your own custom form for accepting the billing info and then add that to the Payment Method object that's created by the Card Element

queen bolt
#

i already got the card fields like the CardNumber, Expiry and CVC

#

But i'd like to collect billing address

rigid zephyr
queen bolt
#

pretty sure you can pass it to confirmPayment but I'm using setup intents

rigid zephyr
#

Yeah, that's another way to do it, but it doesn't work with the Card Element. It effectively does the same thing, but with less steps using the Payment Element (which is much better and not deprecated): https://docs.stripe.com/js/setup_intents/confirm_setup#confirm_setup_intent-options-confirmParams-payment_method_data-billing_details

You'd still have to have their address before the confirmation step though. This doesn't display anything in the UI for you. It just allows you to send info you already have along with the Payment Method while it gets confirmed.

queen bolt
#

I'm not using the cardElement anyways

#

So we got no way to have autocomplete unless i implement it myself, correct?

rigid zephyr
#

Correct. You would need to build that yourself if you don't want to use the Address Element

queen bolt
#

alright, thanks

#

Oh and last thing, is there a way to disable my button if the card number is invalid, if there are no cvc, or no expiry date?

rigid zephyr
#

Those are required fields, so they won't be able to submit the payment (as far as I know) if they're not filled in