#Nate - Elements email

1 messages · Page 1 of 1 (latest)

mellow gust
#

What user types are you looking to retrieve?

night raptor
#

so i'm using the us_bank_account=betav2 functionality and am running into an issue where i need to call a stripe method directly and pull whatever the user types in from the Name and Email fields. The last time I mentioned I'm working with a beta my thread got archived but this is a bit time sensitive so I'm hoping we can work around that

#

Basically I am using a react PaymentElement and one of my payment types is [us_bank_pay] where the user fills out an email and a name which invokes that process, however since they are entering it within a stripe element, I seem to have no way of accessing what they are typing ? If I can access that my issues would be solved

mellow gust
#

Nate - Elements email

#

Gotcha. Checking in to if there is a way to pull that field from the client side.

#

What do you need the email for? Still looking in to your initial question, I just want to keep that in mind in case we need a workaround.

night raptor
#

Thanks for looking into it this is super appreciated, I have been unable to find help and at this point any kind of workaround would be awesome

#

I can add a few screenshots to make more sense, but I need to call this

#

and the billing details that are provided that I need to pass in are in this stripe form

#

So I am at the point where best case scenario I can pull those values from this PaymentElement react element and plug it into my above code

red flint
#

And this form is loaded into your site via Stripe React?

night raptor
#

Yes, I am using react and am using a PaymentElement, here is my JSX for the stripe form

red flint
#

What have you already tried to access the value in the email field?

night raptor
#

This is where I'm unsure how I would access it, because I cannot pull any DOM elements out of the iframe with a getElementById or something of that sort

#

I'm hoping there there is some way to possibly pull it from the react stripe library?

red flint
#

The React library is just a thin wrapper around the Stripe Elements javascript.

night raptor
#

Ah ok so no values can be pulled out? So do you not see this as a valid solution? Is getting the value of a textbox within a stripe element just not going to be possible in your opinion? I can go another direction

#

Here is what invoked me doing this in the first place:

#

Maybe you can redirect me or help with it

#

I had our payments integrated with stripe using us_bank_account=betav1 however we needed to move to us_bank_account=betav2 to use some functionality that is not in v1. In v1 when the confirmPayment method is called, the paymentelement automatically knew to pull up the forms for the user to enter their name and email which is a required parameter in the method collectUsBankAccountForPayment. In v2 now we are just thrown an error, so combat this I catch the error, and then call the method, but I cannot access the fields in the stripe form when I do have to call it myself.

red flint
#

In that case I would think it would make more sense to instantiate the Stripe Element without those fields, then create them yourself as part of your interface so you can access the values within them.

night raptor
#

Ahh yes this is what I feared lol

#

So are you suggesting that I use stripe forms for all forms of payment, and then if they want to use bank pay I just make my own UI? And this would means that I do not include [us_bank_account] for the payment_method_types on this paymentIntent then correct? So that it would not show on the stripe form

red flint
#

Not entirely you own UI, I would still use the Stripe form for collecting the actual bank information

#

e.g. Routing number, account number

night raptor
#

Yes yes of course

#

Ah ok well I think that is the direction I'll go until they fix v2 lol

#

Thanks for the help !