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

How to mask card number #43

Closed
iamRamkumar opened this issue Jun 26, 2019 · 2 comments
Closed

How to mask card number #43

iamRamkumar opened this issue Jun 26, 2019 · 2 comments

Comments

@iamRamkumar
Copy link

iamRamkumar commented Jun 26, 2019

is there any way to mask credit card number.

I want to mask number like this "**** **** **** 4242"

I am Invoking the component like below:

<Cards number={parsedNumber} name={name} expiry={expiry} 
               cvc={cvc} focused={focused} acceptedCards={acceptedCards}
               callback={this.handleCallback} preview={true} />

Expected the number will be shown like this "**** **** **** 4242". but actual number is showing on the card

@gilbarbara
Copy link
Contributor

The preview prop is used to allow you to set a "saved" number with masked characters and still show the branded card.
It won't mask the number for you.

@iamRamkumar
Copy link
Author

thanks @gilbarbara

I missed passing issuer prop to Card component. now I am able to show number like this "**** **** **** 4242"

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