angular-card icon indicating copy to clipboard operation
angular-card copied to clipboard

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

Open MADavies opened this issue 8 years ago • 1 comments

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

MADavies avatar Oct 28 '16 13:10 MADavies

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!

Doginal avatar Dec 12 '16 00:12 Doginal