-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 to use directly instead of inputs? #407
Comments
Hi there, Good news, it's possible! I highly recommend reading the documentation - this repo actually has decent documentation, so take advantage of it when you can! :) From a quick test using the example, you need to have Hope that helps! EDIT: I also recommend against saving things like card numbers in the database - it is very easy to get things wrong, and money is on the line. Check out things like Stripe Elements to help you stay secure! |
Is it possible? But in the documentation, I only see the examples that require inputs. But if I have the "value" in the database, that doesn't require's any input how I can do it? I spent on this around 48 hours reading, and reading, and still not figure how to do it. I have this:
PS: Its possible to see your code if you did something similar? Thanks!! |
@LeebranZadwell Can you please explain to me what to do after this?
What code i should run here:
Thanks again! |
48 Hours?! Oh man, sorry to hear that. Right - the examples have fields, and that's why I had to test it without. I was able to get it to work by commenting out fields. Check out the example I linked earlier, it spells the whole thing out verbatim:
Delete the fields in the example, and you're golden. Honestly, I feel your pain, but this is a lot of time to spend on a problem that is directly spelled out in the documentation. I think the bigger issue here is you feel stuck, so here are some good steps when I feel stuck:
At the end of the day, I'm not really doing you any favours just giving you the answer here, but I understand your frustration and I want to help. Start simple. Frustration like this is a sign that you might be a little out of your depth. That being said, keep at it!!! |
@LeebranZadwell https://puu.sh/B1MZG/8fa8662f8a.png 1 million thanks!! My code:
|
Awesome! Really glad to hear it's working! Yeah, you gotta try it. Debugging is all about breaking down assumptions. Worst case scenario you see an error and you know moving forward. The brand is not set using placeholders, you'll need to set the brand yourself. I actually speak about it in this thread: #372 (comment) There is more detail here as well: It's a bit advanced, so take your time with it and start simple. This is about all I can help with at the moment, so good luck! |
Thank you, you are a master! But i'm seeing in your examples you are using: Which I really don't need because I'm not using Stripe. So I should run this code directly?
Before the new Card or after? |
You've grabbed a snippet from the portion labelled Highlighting Fields on Card. Your original question is about changing the brand. Is this about changing the brand, or highlighting fields on the card? Take a minute. Read it all. |
@LeebranZadwell My only purpose is to load from the database, which now is working! Now need to change the color depending on the brand (Visa, Mastercard...) This is the code you posted:
But i see there a lot of things that i think i don't need like: checkout_stripe, brand. (i'm not sure what is that url path) Thanks again, and sorry I really appreciate it the effort that when someone doesn't understand a language and you try to communicate with him. |
Everyone starts somewhere! Nothing to apologize about, I just recommend taking a bit more time to understand what's going on, especially if you're learning. Having read it all - It's pretty clear that some key pieces of information are getting skipped somehow - regardless of how experienced you are, this is something you'll want to look at. I'm not placing any judgement on this, I'm saying this is likely your biggest obstacle to your personal improvement as well as tackling this issue. I've been there myself, so I believe we have common ground there! Hope this all helps, I gotta get back to some stuff I'm stumped on! Keep at it! |
Thanks for all @LeebranZadwell I'm stuck even on the first line: I've spent too many hours on this, and I can't think anymore. Maybe someone will read this and finds useful to do, what I can't do. |
Hello, I want to use this directly loading data from my database instead of inputs.
Instead:
Something like:
Any idea?
Thanks!
The text was updated successfully, but these errors were encountered: