Skip to content
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

Just using card to show pre-existing payment methods. Angular #26

Open
MADavies opened this issue Oct 28, 2016 · 1 comment
Open

Just using card to show pre-existing payment methods. Angular #26

MADavies opened this issue Oct 28, 2016 · 1 comment

Comments

@MADavies
Copy link

Hey guys

Im just a little stuck with how to inject the information i want into the card without having to input it into a field first. I already have all the payment details pre populated from braintree and the backend of my web app and i just want a visual representation of those payment methods to show in a list item. So how can i pre populate the card without having to input stuff into a form?

Cheers

@Doginal
Copy link

Doginal commented Dec 12, 2016

Hey MADavies,

I was looking for the same thing for a project I have been working on, what I did was copied the HTML from the card directive. I then used a ng-repeat to pass the card info to this template. You have to figure out what type of card it is and use ng-class to set the correct class!

By using the HTML only, this allows me to use the CSS from the card directive without needing to use actual directive, no need for the form and you can even pass in a masked card number!

ie **** **** **** 1234!

A con is that you can't see CVC, but you shouldn't show a CVC or store it. Also, I don't think your response from Braintree will not have the CVC included.

Here is the HTML:
https://plnkr.co/edit/XwbRxN0X6DhAQUBDVeTR?p=catalogue

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants