0.0.3 • Published 4 years ago
@bernardo.paroli/inswitch-react-native-tokenization v0.0.3
Inswitch card tokenization form
Installation
npm install @bernardo.paroli/inswitch-react-native-tokenizationUsage
import CardTokenizationForm from 'card-tokenization'
<CardTokenizationForm
apiKey={'YOUR_API_KEY_HERE'}
accessToken={'YOUR_API_KEY_HERE'}
language='es'
onSuccess={onTokenizeCard}
/>This will render the following form
Component props
| Prop name | Default value | type | Required | Description |
|---|---|---|---|---|
| language | es | es,en,pt | no | Language of the form |
| apiKey | null | String | yes | Api key to use at Inswitch |
| accessToken | null | String | yes | Inswitch platform access token (without Bearer) |
| onSuccess | () => {} | Function | yes | Tokenization success callback |
| displayCancelButton | false | Boolean | no | Show/hide the cancel button |
| onCancel | () => {} | Function | no | Cancel button press |
| isSandboxMode | false | Boolean | no | Bool value to select enviorment |
Running the example
In order to run the example you must create keys.ts file inside example/src in order to supply the apiKey and accessToken
th file must have the following exports
export const apiKey: string = 'API_KEY_HERE';
export const accessToken: string = 'ACCESS_TOKEN_HERE';License
MIT