TODO
npm install react-native-masterpass-kit$ yarn add react-native-masterpass-kit
MasterPassKit.framework to node_modules/react-native-masterpass-kit/ios/Frameworkscheckoutcode: string (required) __This is the code created by calling the Masterpass API representing the transaction.__apiKey: string (required) __This is the API key provided by Masterpass that will enable the library to be used. This can be found on the Masterpass Portal under the Lib Lite Tokens menu item.__system: 'test' | 'live' (required) __Representing the Masterpass backend system to connect to.__preMsisdn: string (optional) __This is an optional field if you know the client’s mobile number.__hash: string (optional) [Android only] __This allows capability for the app to read the SMS for registration. Details on how to generate the HASH key can be String found here https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string__preRegisterapiKey: string (required)system: 'test' | 'live' (required)preMsisdn: string (optional)manageCardListapiKey: string (required)system: 'test' | 'live' (required)preMsisdn: string (optional)registerUserDidCancelEvent __Call when user aborted the process__registerPaymentSucceededEvent __Call when payment success__registerErrorEvent __Call when an error has occurred before the payment__registerPaymentFailedEvent __Call when the payment failed__transaction: string __This is the reference for the failed transaction in the event the 3rd party needs to request more information regarding the failure__registerInvalidCodeEvent __Call when the code param invalid__registerUserRegisterEvent __Call when the user has registered with Masterpass__registerUserCompletedWalletEvent __Call when user done with wallet__javascript
import RNMasterpassKit from 'react-native-masterpass-kit';RNMasterpassKit.checkout({
code: '6799782555',
apiKey: '1234567890',
system: 'test',
});
const subcription = RNMasterpassKit.registerUserDidCancelEvent(() => {
console.warn('User cancelled');
});
// And later on
subcription.remove();
``