npm install msdk-react-native
or
yarn install msdk-react-native
Usage
// 1. Create the EcmpPaymentInfo objectletpaymentInfo: EcmpPaymentInfo={projectID: 12123123,paymentID: "paymentId11",paymentAmount: 22200,paymentCurrency: "USD",}// 2. Sign the parameters contained in the EcmpPaymentInfo objectletparamsForSignature=getParamsForSignature(paymentInfo)paymentInfo.signature="CALCULATED_SIGNATURE_FROM_YOUR_BACKEND"// 3. Create the EcmpPaymentOptions object that contains the required parameter actionType (enum) with the value specifying the required operation typeletpaymentOptions: EcmpPaymentOptions={actionType: EcmpActionType.Tokenize,paymentInfo: paymentInfo,isDarkTheme: true,//if need use real service- set EcmpMockModeType.disabledmockModeType: EcmpMockModeType.success,//set display mode if needscreenDisplayModes: [EcmpScreenDisplayMode.hideDeclineFinalPage],//set additional fields if needadditionalFields: [{type: 'email',value: 'mail@mail.com'}]}// 4. Open the payment form and handle resultconsthandleResult=(result)=>{console.log(result);}initializePayment(paymentOptions,handleResult)