-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I get at the values in the element? #9
Comments
@Jordan4jc here's an example used in a production application, if it helps: https://github.com/code-corps/code-corps-ember/blob/4d93edcef0d46592f5359f0c45939d55c24ca6bd/app/templates/components/donation/donation-container.hbs#L15-L31 |
And actually, the really relevant stuff is found here: https://github.com/code-corps/code-corps-ember/blob/develop/app/controllers/project/checkout.js#L36-L46 |
In particular, you want to notice doing something like this:
...will allow you to get at the Does that make sense and do you what you want? If so, how can we improve this in the docs? |
Yes this gets me something I can use, thanks! |
Hi. I still have the same question that is described in this thread. I have a form to collect name, billing address and I'm trying to drop in the stripe elements credit card widget. When the user "submits" the entire form, how do I get to the stripe elements to create the token in my component action? Is there an example anywhere of the "onBlur" action? |
I was able to figure this out by using an "onBlur" action to save a reference to the "stripe element" in my component. Then in the forms' "submit" action, the stripe element could be combined with the rest of the form data. I'm not sure if this was the best way to do this, but it works at this point. |
Hi John |
I only know that Stripes createToken needs cardNumber elements to be pass. I've use stripe.elements instead of components and mounted them to component as I still don't know how to use those components except card one. |
I have a similar question: can you please provide an example without {{stripe-card}} but exploiting {{stripe-card-number}} and {{stripe-card-expiry}}? |
I had the most luck doing the following:
Then I was able to access the I think the |
I'm just a bit confused as to how I get the values entered in the
stripe-card
element. I don't want to use the block form because I have a submit button outside of this element that will send along some other data to a server endpoint that creates a paysource in the customers stripe account. Can I have the values bound to some sort of controller / component property so I can get at those later when the user hits the submit button I have outside of the element?The text was updated successfully, but these errors were encountered: