0.0.3 • Published 2 years ago

@bernardo.paroli/inswitch-react-native-tokenization v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Inswitch card tokenization form

Installation

npm install @bernardo.paroli/inswitch-react-native-tokenization

Usage

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 nameDefault valuetypeRequiredDescription
languageeses,en,ptnoLanguage of the form
apiKeynullStringyesApi key to use at Inswitch
accessTokennullStringyesInswitch platform access token (without Bearer)
onSuccess() => {}FunctionyesTokenization success callback
displayCancelButtonfalseBooleannoShow/hide the cancel button
onCancel() => {}FunctionnoCancel button press
isSandboxModefalseBooleannoBool 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