A payment card display component and card validator for react native applications.
Installation
npm install --save react-native-payment-card
Usage
<CreditCardInput
autoFocus
requiresName
requiresCVC
labelStyle={}
inputStyle={}
validColor={"black"}
invalidColor={"red"}
placeholderColor={"darkgray"}
onChange={this._onChange}
/>
//Note: The data entered in the card component is availaible in the onChange Method.
Props
Props
Type
Description
autoFocus
PropTypes.bool
Automatically sets focus on input field
onChange
PropTypes.func
Returns a object with keys name,email,cvv,card number and its value that can be used.