@networkinternational/ni-card-management-sdk 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +651 -0
- package/android/build.gradle +95 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/android/src/main/java/com/nicardmanagement/JsonDeserialization.kt +24 -0
- package/android/src/main/java/com/nicardmanagement/NiCardManagementModule.kt +163 -0
- package/android/src/main/java/com/nicardmanagement/NiCardManagementPackage.kt +17 -0
- package/ios/NiCardManagement-Bridging-Header.h +2 -0
- package/ios/NiCardManagement.mm +29 -0
- package/ios/NiCardManagement.swift +142 -0
- package/lib/commonjs/NICardManagementComponents/CardDetailsComponent.js +71 -0
- package/lib/commonjs/NICardManagementComponents/CardDetailsComponent.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/ChangePinView.js +44 -0
- package/lib/commonjs/NICardManagementComponents/ChangePinView.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/NiInputInterfaces.js +17 -0
- package/lib/commonjs/NICardManagementComponents/NiInputInterfaces.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/SetPinView.js +44 -0
- package/lib/commonjs/NICardManagementComponents/SetPinView.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/VerifyPinView.js +44 -0
- package/lib/commonjs/NICardManagementComponents/VerifyPinView.js.map +1 -0
- package/lib/commonjs/NICardManagementComponents/ViewPinComponent.js +52 -0
- package/lib/commonjs/NICardManagementComponents/ViewPinComponent.js.map +1 -0
- package/lib/commonjs/assets/icons/content-copy.png +0 -0
- package/lib/commonjs/assets/icons/eye-off-outline.png +0 -0
- package/lib/commonjs/assets/icons/eye-outline.png +0 -0
- package/lib/commonjs/assets/icons/icons8-arrow-100.png +0 -0
- package/lib/commonjs/assets/icons/icons8-arrow-100_1.png +0 -0
- package/lib/commonjs/assets/icons/red-eye-off-outline.png +0 -0
- package/lib/commonjs/assets/icons/red-eye-outline.png +0 -0
- package/lib/commonjs/assets/images/grayCard.png +0 -0
- package/lib/commonjs/components/CardDetails/CardDetails.js +27 -0
- package/lib/commonjs/components/CardDetails/CardDetails.js.map +1 -0
- package/lib/commonjs/components/CardDetails/CardDetailsBackgroundImage.js +29 -0
- package/lib/commonjs/components/CardDetails/CardDetailsBackgroundImage.js.map +1 -0
- package/lib/commonjs/components/CardDetails/CardDetailsGroups.js +94 -0
- package/lib/commonjs/components/CardDetails/CardDetailsGroups.js.map +1 -0
- package/lib/commonjs/components/CardDetails/CardHolderNameGroups.js +67 -0
- package/lib/commonjs/components/CardDetails/CardHolderNameGroups.js.map +1 -0
- package/lib/commonjs/components/CardDetails/CardNumberGroup.js +69 -0
- package/lib/commonjs/components/CardDetails/CardNumberGroup.js.map +1 -0
- package/lib/commonjs/components/CardDetails/DateCVVGroupOneRow.js +104 -0
- package/lib/commonjs/components/CardDetails/DateCVVGroupOneRow.js.map +1 -0
- package/lib/commonjs/components/CardDetails/styles.js +98 -0
- package/lib/commonjs/components/CardDetails/styles.js.map +1 -0
- package/lib/commonjs/components/ChangePin/CaptureCurrentPin.js +50 -0
- package/lib/commonjs/components/ChangePin/CaptureCurrentPin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/CaptureNewPin.js +50 -0
- package/lib/commonjs/components/ChangePin/CaptureNewPin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/ChangePin.js +135 -0
- package/lib/commonjs/components/ChangePin/ChangePin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/ConfirmPin.js +39 -0
- package/lib/commonjs/components/ChangePin/ConfirmPin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/ReenterNewPin.js +53 -0
- package/lib/commonjs/components/ChangePin/ReenterNewPin.js.map +1 -0
- package/lib/commonjs/components/ChangePin/styles.js +29 -0
- package/lib/commonjs/components/ChangePin/styles.js.map +1 -0
- package/lib/commonjs/components/NIButton/NIButton.js +46 -0
- package/lib/commonjs/components/NIButton/NIButton.js.map +1 -0
- package/lib/commonjs/components/NIButton/styles.js +15 -0
- package/lib/commonjs/components/NIButton/styles.js.map +1 -0
- package/lib/commonjs/components/Pin/CapturePin.js +152 -0
- package/lib/commonjs/components/Pin/CapturePin.js.map +1 -0
- package/lib/commonjs/components/Pin/NextButton.js +40 -0
- package/lib/commonjs/components/Pin/NextButton.js.map +1 -0
- package/lib/commonjs/components/Pin/ShowHideButton.js +48 -0
- package/lib/commonjs/components/Pin/ShowHideButton.js.map +1 -0
- package/lib/commonjs/components/Pin/styles.js +61 -0
- package/lib/commonjs/components/Pin/styles.js.map +1 -0
- package/lib/commonjs/components/PinState/LoadingState.js +29 -0
- package/lib/commonjs/components/PinState/LoadingState.js.map +1 -0
- package/lib/commonjs/components/PinState/PinState.js +29 -0
- package/lib/commonjs/components/PinState/PinState.js.map +1 -0
- package/lib/commonjs/components/SetPin/ConfirmPin.js +39 -0
- package/lib/commonjs/components/SetPin/ConfirmPin.js.map +1 -0
- package/lib/commonjs/components/SetPin/ReenterCardPin.js +53 -0
- package/lib/commonjs/components/SetPin/ReenterCardPin.js.map +1 -0
- package/lib/commonjs/components/SetPin/SetPin.js +118 -0
- package/lib/commonjs/components/SetPin/SetPin.js.map +1 -0
- package/lib/commonjs/components/SetPin/SetUpNewCardPin.js +50 -0
- package/lib/commonjs/components/SetPin/SetUpNewCardPin.js.map +1 -0
- package/lib/commonjs/components/SetPin/styles.js +29 -0
- package/lib/commonjs/components/SetPin/styles.js.map +1 -0
- package/lib/commonjs/components/VerifyPin/CaptureVerifyPin.js +50 -0
- package/lib/commonjs/components/VerifyPin/CaptureVerifyPin.js.map +1 -0
- package/lib/commonjs/components/VerifyPin/ConfirmPin.js +40 -0
- package/lib/commonjs/components/VerifyPin/ConfirmPin.js.map +1 -0
- package/lib/commonjs/components/VerifyPin/VerifyPin.js +92 -0
- package/lib/commonjs/components/VerifyPin/VerifyPin.js.map +1 -0
- package/lib/commonjs/components/VerifyPin/styles.js +26 -0
- package/lib/commonjs/components/VerifyPin/styles.js.map +1 -0
- package/lib/commonjs/components/ViewPin/ViewPin.js +76 -0
- package/lib/commonjs/components/ViewPin/ViewPin.js.map +1 -0
- package/lib/commonjs/components/ViewPin/styles.js +19 -0
- package/lib/commonjs/components/ViewPin/styles.js.map +1 -0
- package/lib/commonjs/components/icons/PredeterminedIcon.js +43 -0
- package/lib/commonjs/components/icons/PredeterminedIcon.js.map +1 -0
- package/lib/commonjs/config/configCard.js +9 -0
- package/lib/commonjs/config/configCard.js.map +1 -0
- package/lib/commonjs/config/localization.js +47 -0
- package/lib/commonjs/config/localization.js.map +1 -0
- package/lib/commonjs/config/themeColors.js +34 -0
- package/lib/commonjs/config/themeColors.js.map +1 -0
- package/lib/commonjs/hooks/useChangePin.js +37 -0
- package/lib/commonjs/hooks/useChangePin.js.map +1 -0
- package/lib/commonjs/hooks/useGetCardDetails.js +37 -0
- package/lib/commonjs/hooks/useGetCardDetails.js.map +1 -0
- package/lib/commonjs/hooks/useSetPin.js +37 -0
- package/lib/commonjs/hooks/useSetPin.js.map +1 -0
- package/lib/commonjs/hooks/useVerifyPin.js +37 -0
- package/lib/commonjs/hooks/useVerifyPin.js.map +1 -0
- package/lib/commonjs/hooks/useViewPin.js +37 -0
- package/lib/commonjs/hooks/useViewPin.js.map +1 -0
- package/lib/commonjs/index.js +72 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/interfaces/NiCardManagementInterfaces.js +2 -0
- package/lib/commonjs/interfaces/NiCardManagementInterfaces.js.map +1 -0
- package/lib/commonjs/interfaces/NiInputInterfaces.js +39 -0
- package/lib/commonjs/interfaces/NiInputInterfaces.js.map +1 -0
- package/lib/commonjs/interfaces/NiInterfaces.js +14 -0
- package/lib/commonjs/interfaces/NiInterfaces.js.map +1 -0
- package/lib/commonjs/nativeComponents/NICardManagementSDKModule.js +9 -0
- package/lib/commonjs/nativeComponents/NICardManagementSDKModule.js.map +1 -0
- package/lib/commonjs/utils/formatInput.js +10 -0
- package/lib/commonjs/utils/formatInput.js.map +1 -0
- package/lib/commonjs/utils/localization.js +13 -0
- package/lib/commonjs/utils/localization.js.map +1 -0
- package/lib/module/NICardManagementComponents/CardDetailsComponent.js +57 -0
- package/lib/module/NICardManagementComponents/CardDetailsComponent.js.map +1 -0
- package/lib/module/NICardManagementComponents/ChangePinView.js +32 -0
- package/lib/module/NICardManagementComponents/ChangePinView.js.map +1 -0
- package/lib/module/NICardManagementComponents/NiInputInterfaces.js +3 -0
- package/lib/module/NICardManagementComponents/NiInputInterfaces.js.map +1 -0
- package/lib/module/NICardManagementComponents/SetPinView.js +32 -0
- package/lib/module/NICardManagementComponents/SetPinView.js.map +1 -0
- package/lib/module/NICardManagementComponents/VerifyPinView.js +32 -0
- package/lib/module/NICardManagementComponents/VerifyPinView.js.map +1 -0
- package/lib/module/NICardManagementComponents/ViewPinComponent.js +38 -0
- package/lib/module/NICardManagementComponents/ViewPinComponent.js.map +1 -0
- package/lib/module/assets/icons/content-copy.png +0 -0
- package/lib/module/assets/icons/eye-off-outline.png +0 -0
- package/lib/module/assets/icons/eye-outline.png +0 -0
- package/lib/module/assets/icons/icons8-arrow-100.png +0 -0
- package/lib/module/assets/icons/icons8-arrow-100_1.png +0 -0
- package/lib/module/assets/icons/red-eye-off-outline.png +0 -0
- package/lib/module/assets/icons/red-eye-outline.png +0 -0
- package/lib/module/assets/images/grayCard.png +0 -0
- package/lib/module/components/CardDetails/CardDetails.js +20 -0
- package/lib/module/components/CardDetails/CardDetails.js.map +1 -0
- package/lib/module/components/CardDetails/CardDetailsBackgroundImage.js +22 -0
- package/lib/module/components/CardDetails/CardDetailsBackgroundImage.js.map +1 -0
- package/lib/module/components/CardDetails/CardDetailsGroups.js +85 -0
- package/lib/module/components/CardDetails/CardDetailsGroups.js.map +1 -0
- package/lib/module/components/CardDetails/CardHolderNameGroups.js +60 -0
- package/lib/module/components/CardDetails/CardHolderNameGroups.js.map +1 -0
- package/lib/module/components/CardDetails/CardNumberGroup.js +62 -0
- package/lib/module/components/CardDetails/CardNumberGroup.js.map +1 -0
- package/lib/module/components/CardDetails/DateCVVGroupOneRow.js +97 -0
- package/lib/module/components/CardDetails/DateCVVGroupOneRow.js.map +1 -0
- package/lib/module/components/CardDetails/styles.js +92 -0
- package/lib/module/components/CardDetails/styles.js.map +1 -0
- package/lib/module/components/ChangePin/CaptureCurrentPin.js +43 -0
- package/lib/module/components/ChangePin/CaptureCurrentPin.js.map +1 -0
- package/lib/module/components/ChangePin/CaptureNewPin.js +43 -0
- package/lib/module/components/ChangePin/CaptureNewPin.js.map +1 -0
- package/lib/module/components/ChangePin/ChangePin.js +126 -0
- package/lib/module/components/ChangePin/ChangePin.js.map +1 -0
- package/lib/module/components/ChangePin/ConfirmPin.js +32 -0
- package/lib/module/components/ChangePin/ConfirmPin.js.map +1 -0
- package/lib/module/components/ChangePin/ReenterNewPin.js +46 -0
- package/lib/module/components/ChangePin/ReenterNewPin.js.map +1 -0
- package/lib/module/components/ChangePin/styles.js +23 -0
- package/lib/module/components/ChangePin/styles.js.map +1 -0
- package/lib/module/components/NIButton/NIButton.js +38 -0
- package/lib/module/components/NIButton/NIButton.js.map +1 -0
- package/lib/module/components/NIButton/styles.js +9 -0
- package/lib/module/components/NIButton/styles.js.map +1 -0
- package/lib/module/components/Pin/CapturePin.js +143 -0
- package/lib/module/components/Pin/CapturePin.js.map +1 -0
- package/lib/module/components/Pin/NextButton.js +33 -0
- package/lib/module/components/Pin/NextButton.js.map +1 -0
- package/lib/module/components/Pin/ShowHideButton.js +41 -0
- package/lib/module/components/Pin/ShowHideButton.js.map +1 -0
- package/lib/module/components/Pin/styles.js +55 -0
- package/lib/module/components/Pin/styles.js.map +1 -0
- package/lib/module/components/PinState/LoadingState.js +22 -0
- package/lib/module/components/PinState/LoadingState.js.map +1 -0
- package/lib/module/components/PinState/PinState.js +22 -0
- package/lib/module/components/PinState/PinState.js.map +1 -0
- package/lib/module/components/SetPin/ConfirmPin.js +32 -0
- package/lib/module/components/SetPin/ConfirmPin.js.map +1 -0
- package/lib/module/components/SetPin/ReenterCardPin.js +46 -0
- package/lib/module/components/SetPin/ReenterCardPin.js.map +1 -0
- package/lib/module/components/SetPin/SetPin.js +109 -0
- package/lib/module/components/SetPin/SetPin.js.map +1 -0
- package/lib/module/components/SetPin/SetUpNewCardPin.js +43 -0
- package/lib/module/components/SetPin/SetUpNewCardPin.js.map +1 -0
- package/lib/module/components/SetPin/styles.js +23 -0
- package/lib/module/components/SetPin/styles.js.map +1 -0
- package/lib/module/components/VerifyPin/CaptureVerifyPin.js +43 -0
- package/lib/module/components/VerifyPin/CaptureVerifyPin.js.map +1 -0
- package/lib/module/components/VerifyPin/ConfirmPin.js +33 -0
- package/lib/module/components/VerifyPin/ConfirmPin.js.map +1 -0
- package/lib/module/components/VerifyPin/VerifyPin.js +83 -0
- package/lib/module/components/VerifyPin/VerifyPin.js.map +1 -0
- package/lib/module/components/VerifyPin/styles.js +20 -0
- package/lib/module/components/VerifyPin/styles.js.map +1 -0
- package/lib/module/components/ViewPin/ViewPin.js +67 -0
- package/lib/module/components/ViewPin/ViewPin.js.map +1 -0
- package/lib/module/components/ViewPin/styles.js +13 -0
- package/lib/module/components/ViewPin/styles.js.map +1 -0
- package/lib/module/components/icons/PredeterminedIcon.js +35 -0
- package/lib/module/components/icons/PredeterminedIcon.js.map +1 -0
- package/lib/module/config/configCard.js +3 -0
- package/lib/module/config/configCard.js.map +1 -0
- package/lib/module/config/localization.js +41 -0
- package/lib/module/config/localization.js.map +1 -0
- package/lib/module/config/themeColors.js +29 -0
- package/lib/module/config/themeColors.js.map +1 -0
- package/lib/module/hooks/useChangePin.js +29 -0
- package/lib/module/hooks/useChangePin.js.map +1 -0
- package/lib/module/hooks/useGetCardDetails.js +29 -0
- package/lib/module/hooks/useGetCardDetails.js.map +1 -0
- package/lib/module/hooks/useSetPin.js +29 -0
- package/lib/module/hooks/useSetPin.js.map +1 -0
- package/lib/module/hooks/useVerifyPin.js +29 -0
- package/lib/module/hooks/useVerifyPin.js.map +1 -0
- package/lib/module/hooks/useViewPin.js +29 -0
- package/lib/module/hooks/useViewPin.js.map +1 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/interfaces/NiCardManagementInterfaces.js +2 -0
- package/lib/module/interfaces/NiCardManagementInterfaces.js.map +1 -0
- package/lib/module/interfaces/NiInputInterfaces.js +33 -0
- package/lib/module/interfaces/NiInputInterfaces.js.map +1 -0
- package/lib/module/interfaces/NiInterfaces.js +8 -0
- package/lib/module/interfaces/NiInterfaces.js.map +1 -0
- package/lib/module/nativeComponents/NICardManagementSDKModule.js +3 -0
- package/lib/module/nativeComponents/NICardManagementSDKModule.js.map +1 -0
- package/lib/module/utils/formatInput.js +4 -0
- package/lib/module/utils/formatInput.js.map +1 -0
- package/lib/module/utils/localization.js +7 -0
- package/lib/module/utils/localization.js.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/CardDetailsComponent.d.ts +7 -0
- package/lib/typescript/src/NICardManagementComponents/CardDetailsComponent.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/ChangePinView.d.ts +6 -0
- package/lib/typescript/src/NICardManagementComponents/ChangePinView.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/NiInputInterfaces.d.ts +4 -0
- package/lib/typescript/src/NICardManagementComponents/NiInputInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/SetPinView.d.ts +6 -0
- package/lib/typescript/src/NICardManagementComponents/SetPinView.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/VerifyPinView.d.ts +6 -0
- package/lib/typescript/src/NICardManagementComponents/VerifyPinView.d.ts.map +1 -0
- package/lib/typescript/src/NICardManagementComponents/ViewPinComponent.d.ts +6 -0
- package/lib/typescript/src/NICardManagementComponents/ViewPinComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardDetails.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardDetails.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardDetailsBackgroundImage.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardDetailsBackgroundImage.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardDetailsGroups.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardDetailsGroups.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardHolderNameGroups.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardHolderNameGroups.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/CardNumberGroup.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/CardNumberGroup.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/DateCVVGroupOneRow.d.ts +4 -0
- package/lib/typescript/src/components/CardDetails/DateCVVGroupOneRow.d.ts.map +1 -0
- package/lib/typescript/src/components/CardDetails/styles.d.ts +90 -0
- package/lib/typescript/src/components/CardDetails/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/CaptureCurrentPin.d.ts +4 -0
- package/lib/typescript/src/components/ChangePin/CaptureCurrentPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/CaptureNewPin.d.ts +4 -0
- package/lib/typescript/src/components/ChangePin/CaptureNewPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/ChangePin.d.ts +5 -0
- package/lib/typescript/src/components/ChangePin/ChangePin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/ConfirmPin.d.ts +4 -0
- package/lib/typescript/src/components/ChangePin/ConfirmPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/ReenterNewPin.d.ts +4 -0
- package/lib/typescript/src/components/ChangePin/ReenterNewPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ChangePin/styles.d.ts +22 -0
- package/lib/typescript/src/components/ChangePin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/NIButton/NIButton.d.ts +13 -0
- package/lib/typescript/src/components/NIButton/NIButton.d.ts.map +1 -0
- package/lib/typescript/src/components/NIButton/styles.d.ts +8 -0
- package/lib/typescript/src/components/NIButton/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/Pin/CapturePin.d.ts +4 -0
- package/lib/typescript/src/components/Pin/CapturePin.d.ts.map +1 -0
- package/lib/typescript/src/components/Pin/NextButton.d.ts +4 -0
- package/lib/typescript/src/components/Pin/NextButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Pin/ShowHideButton.d.ts +4 -0
- package/lib/typescript/src/components/Pin/ShowHideButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Pin/styles.d.ts +54 -0
- package/lib/typescript/src/components/Pin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/PinState/LoadingState.d.ts +7 -0
- package/lib/typescript/src/components/PinState/LoadingState.d.ts.map +1 -0
- package/lib/typescript/src/components/PinState/PinState.d.ts +8 -0
- package/lib/typescript/src/components/PinState/PinState.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/ConfirmPin.d.ts +4 -0
- package/lib/typescript/src/components/SetPin/ConfirmPin.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/ReenterCardPin.d.ts +4 -0
- package/lib/typescript/src/components/SetPin/ReenterCardPin.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/SetPin.d.ts +5 -0
- package/lib/typescript/src/components/SetPin/SetPin.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/SetUpNewCardPin.d.ts +4 -0
- package/lib/typescript/src/components/SetPin/SetUpNewCardPin.d.ts.map +1 -0
- package/lib/typescript/src/components/SetPin/styles.d.ts +22 -0
- package/lib/typescript/src/components/SetPin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/VerifyPin/CaptureVerifyPin.d.ts +4 -0
- package/lib/typescript/src/components/VerifyPin/CaptureVerifyPin.d.ts.map +1 -0
- package/lib/typescript/src/components/VerifyPin/ConfirmPin.d.ts +5 -0
- package/lib/typescript/src/components/VerifyPin/ConfirmPin.d.ts.map +1 -0
- package/lib/typescript/src/components/VerifyPin/VerifyPin.d.ts +5 -0
- package/lib/typescript/src/components/VerifyPin/VerifyPin.d.ts.map +1 -0
- package/lib/typescript/src/components/VerifyPin/styles.d.ts +19 -0
- package/lib/typescript/src/components/VerifyPin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/ViewPin/ViewPin.d.ts +5 -0
- package/lib/typescript/src/components/ViewPin/ViewPin.d.ts.map +1 -0
- package/lib/typescript/src/components/ViewPin/styles.d.ts +12 -0
- package/lib/typescript/src/components/ViewPin/styles.d.ts.map +1 -0
- package/lib/typescript/src/components/icons/PredeterminedIcon.d.ts +7 -0
- package/lib/typescript/src/components/icons/PredeterminedIcon.d.ts.map +1 -0
- package/lib/typescript/src/config/configCard.d.ts +3 -0
- package/lib/typescript/src/config/configCard.d.ts.map +1 -0
- package/lib/typescript/src/config/localization.d.ts +39 -0
- package/lib/typescript/src/config/localization.d.ts.map +1 -0
- package/lib/typescript/src/config/themeColors.d.ts +29 -0
- package/lib/typescript/src/config/themeColors.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useChangePin.d.ts +9 -0
- package/lib/typescript/src/hooks/useChangePin.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useGetCardDetails.d.ts +9 -0
- package/lib/typescript/src/hooks/useGetCardDetails.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSetPin.d.ts +9 -0
- package/lib/typescript/src/hooks/useSetPin.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useVerifyPin.d.ts +9 -0
- package/lib/typescript/src/hooks/useVerifyPin.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useViewPin.d.ts +9 -0
- package/lib/typescript/src/hooks/useViewPin.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +7 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/interfaces/NiCardManagementInterfaces.d.ts +37 -0
- package/lib/typescript/src/interfaces/NiCardManagementInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/interfaces/NiInputInterfaces.d.ts +62 -0
- package/lib/typescript/src/interfaces/NiInputInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/interfaces/NiInterfaces.d.ts +232 -0
- package/lib/typescript/src/interfaces/NiInterfaces.d.ts.map +1 -0
- package/lib/typescript/src/nativeComponents/NICardManagementSDKModule.d.ts +4 -0
- package/lib/typescript/src/nativeComponents/NICardManagementSDKModule.d.ts.map +1 -0
- package/lib/typescript/src/utils/formatInput.d.ts +4 -0
- package/lib/typescript/src/utils/formatInput.d.ts.map +1 -0
- package/lib/typescript/src/utils/localization.d.ts +20 -0
- package/lib/typescript/src/utils/localization.d.ts.map +1 -0
- package/package.json +167 -0
- package/react-native-ni-card-management.podspec +43 -0
- package/src/NICardManagementComponents/CardDetailsComponent.tsx +77 -0
- package/src/NICardManagementComponents/ChangePinView.tsx +41 -0
- package/src/NICardManagementComponents/NiInputInterfaces.ts +14 -0
- package/src/NICardManagementComponents/SetPinView.tsx +38 -0
- package/src/NICardManagementComponents/VerifyPinView.tsx +42 -0
- package/src/NICardManagementComponents/ViewPinComponent.tsx +48 -0
- package/src/assets/icons/content-copy.png +0 -0
- package/src/assets/icons/eye-off-outline.png +0 -0
- package/src/assets/icons/eye-outline.png +0 -0
- package/src/assets/icons/icons8-arrow-100.png +0 -0
- package/src/assets/icons/icons8-arrow-100_1.png +0 -0
- package/src/assets/icons/red-eye-off-outline.png +0 -0
- package/src/assets/icons/red-eye-outline.png +0 -0
- package/src/assets/images/grayCard.png +0 -0
- package/src/components/CardDetails/CardDetails.tsx +24 -0
- package/src/components/CardDetails/CardDetailsBackgroundImage.tsx +33 -0
- package/src/components/CardDetails/CardDetailsGroups.tsx +119 -0
- package/src/components/CardDetails/CardHolderNameGroups.tsx +101 -0
- package/src/components/CardDetails/CardNumberGroup.tsx +101 -0
- package/src/components/CardDetails/DateCVVGroupOneRow.tsx +146 -0
- package/src/components/CardDetails/styles.ts +105 -0
- package/src/components/ChangePin/CaptureCurrentPin.tsx +39 -0
- package/src/components/ChangePin/CaptureNewPin.tsx +39 -0
- package/src/components/ChangePin/ChangePin.tsx +153 -0
- package/src/components/ChangePin/ConfirmPin.tsx +47 -0
- package/src/components/ChangePin/ReenterNewPin.tsx +45 -0
- package/src/components/ChangePin/styles.ts +24 -0
- package/src/components/NIButton/NIButton.tsx +57 -0
- package/src/components/NIButton/styles.ts +10 -0
- package/src/components/Pin/CapturePin.tsx +227 -0
- package/src/components/Pin/NextButton.tsx +50 -0
- package/src/components/Pin/ShowHideButton.tsx +53 -0
- package/src/components/Pin/styles.ts +56 -0
- package/src/components/PinState/LoadingState.tsx +30 -0
- package/src/components/PinState/PinState.tsx +33 -0
- package/src/components/SetPin/ConfirmPin.tsx +47 -0
- package/src/components/SetPin/ReenterCardPin.tsx +45 -0
- package/src/components/SetPin/SetPin.tsx +140 -0
- package/src/components/SetPin/SetUpNewCardPin.tsx +39 -0
- package/src/components/SetPin/styles.ts +24 -0
- package/src/components/VerifyPin/CaptureVerifyPin.tsx +39 -0
- package/src/components/VerifyPin/ConfirmPin.tsx +49 -0
- package/src/components/VerifyPin/VerifyPin.tsx +105 -0
- package/src/components/VerifyPin/styles.ts +21 -0
- package/src/components/ViewPin/ViewPin.tsx +99 -0
- package/src/components/ViewPin/styles.ts +14 -0
- package/src/components/icons/PredeterminedIcon.tsx +41 -0
- package/src/config/configCard.ts +2 -0
- package/src/config/localization.ts +44 -0
- package/src/config/themeColors.ts +37 -0
- package/src/hooks/useChangePin.ts +39 -0
- package/src/hooks/useGetCardDetails.ts +38 -0
- package/src/hooks/useSetPin.ts +37 -0
- package/src/hooks/useVerifyPin.ts +37 -0
- package/src/hooks/useViewPin.ts +35 -0
- package/src/index.tsx +6 -0
- package/src/interfaces/NiCardManagementInterfaces.ts +61 -0
- package/src/interfaces/NiInputInterfaces.ts +78 -0
- package/src/interfaces/NiInterfaces.ts +259 -0
- package/src/nativeComponents/NICardManagementSDKModule.ts +5 -0
- package/src/utils/formatInput.ts +8 -0
- package/src/utils/localization.ts +10 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Network International
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,651 @@
|
|
|
1
|
+
# Network International React Native Card Management SDK
|
|
2
|
+
|
|
3
|
+
The Network International React Native Card Management SDK allows you to integrate with Network International standard APIs for card management. (https://developer.network.ae)
|
|
4
|
+
The current supported features are:
|
|
5
|
+
1. Get Secured Card Details : Display a card component providing the ability to show card number, expiry date, CVV and cardholder name. This supports full end to end encryption to securely transport this sensitive information.
|
|
6
|
+
2. Set PIN : Displays a PIN pad to allow cardholder to set a PIN on their new card. The PIN is end to end encrypted to securely transport this sensitive information
|
|
7
|
+
3. Change PIN: Displays two PIN pad to allow the cardholder to change their PIN by providing old & new PIN. The PINs are end to end encrypted to securely transport this sensitive information
|
|
8
|
+
4. Verify PIN: Displays a PIN pad to allow cardholder to verify PIN on their card. The PIN is end to end encrypted to securely transport this sensitive information
|
|
9
|
+
5. View PIN: Displays a component providing the ability to show PIN card. The PIN is end to end encrypted to securely transport this sensitive information
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
The Network International React Native Card Management SDK requires minimum react native version 0.71.0 and later and works with iOS version 12 and above.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
The SDK can be added via [npm](https://docs.npmjs.com) or [yarn](https://classic.yarnpkg.com/). Refer to the CONTRIBUTING.md file for the example app installation steps.
|
|
16
|
+
The SDK requires the following dependencies: react-native-paper, @react-native-community/clipboard, react-native-linear-gradient. If you did not already, please install them before installing the SDK.
|
|
17
|
+
|
|
18
|
+
##### npm
|
|
19
|
+
|
|
20
|
+
- Please install the react-native-paper @react-native-community/clipboard react-native-linear-gradient packages only if you did not already.
|
|
21
|
+
|
|
22
|
+
```node
|
|
23
|
+
nmp install react-native-paper @react-native-community/clipboard react-native-linear-gradient
|
|
24
|
+
npm install @networkinternational/ni-card-management-sdk
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### yarn
|
|
28
|
+
|
|
29
|
+
- Please install the react-native-paper @react-native-community/clipboard react-native-linear-gradient packages only if you did not already.
|
|
30
|
+
|
|
31
|
+
```node
|
|
32
|
+
yarn add react-native-paper @react-native-community/clipboard react-native-linear-gradient
|
|
33
|
+
yarn add @networkinternational/ni-card-management-sdk
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### OPTIONAL INTEGRATION STEPS
|
|
37
|
+
|
|
38
|
+
In case of issues when running the iOS or the Android application after installing the SDK, try the following steps.
|
|
39
|
+
|
|
40
|
+
#### Optional iOS integration steps.
|
|
41
|
+
|
|
42
|
+
- Open the iOS project (from the iOS folder: nameOfTheProject.xcworkspace) in Xcode.
|
|
43
|
+
- Remove LaunchScreen.storyboard and Images.xcassets resources from Build Phases -> Copy Bundle Resources
|
|
44
|
+
- Add libNiCardManagementSDK.a in General -> Frameworks, Libraries, and Embedded Content
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
#### Optional Android integration steps
|
|
48
|
+
|
|
49
|
+
- Open the Android project inside Android Studio
|
|
50
|
+
- Locate build.gradle (Project: NameOfTheProject) file and add the following:
|
|
51
|
+
|
|
52
|
+
```java
|
|
53
|
+
dependencies {
|
|
54
|
+
...
|
|
55
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
56
|
+
...
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- Open AndroidManifest.xml (app -> manifests) and change android:allowBackup from “false” to “true”
|
|
61
|
+
|
|
62
|
+
- In case of issues when building from terminal the project, try opening the android project inside Android studio and let it do the indexing and all the other things necessary to sync the project then try again to build it first from Android Studio and then later from terminal
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## Integration
|
|
66
|
+
|
|
67
|
+
#### Basics
|
|
68
|
+
After you have installed the SDK, by following one of the above set of steps, you can import the SDK into your react native app and used it.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
#### Usage
|
|
72
|
+
|
|
73
|
+
###### Create NIInput model
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
import {
|
|
77
|
+
NiInputInterface,
|
|
78
|
+
NIConnectionProperties,
|
|
79
|
+
NIDisplayAttributes,
|
|
80
|
+
NIThemeEnum,
|
|
81
|
+
NILanguageEnum,
|
|
82
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
83
|
+
|
|
84
|
+
export const input: NiInputInterface = {
|
|
85
|
+
bankCode: [yourBankCode],
|
|
86
|
+
cardIdentifierId: [cardIdentifierId],
|
|
87
|
+
cardIdentifierType: [cardIdentifierType],
|
|
88
|
+
connectionProperties: NIConnectionProperties = {
|
|
89
|
+
rootUrl: [rootUrl], token: [token],
|
|
90
|
+
},
|
|
91
|
+
displayAttributes: NIDisplayAttributes = {
|
|
92
|
+
theme: NIThemeEnum.light as themeType,
|
|
93
|
+
language: NILanguageEnum.english as languageType,
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
###### Display attributes
|
|
99
|
+
Display attributes parameter is optional. You can set one or more attributes, or even none of them.
|
|
100
|
+
|
|
101
|
+
1. Theme
|
|
102
|
+
|
|
103
|
+
We support dark and light mode, by setting the theme parameter from the display attributes. If the Customer App is in dark mode, then you should use our SDK with dark theme. If the Customer App is in light mode, then you should use our SDK with light theme.
|
|
104
|
+
|
|
105
|
+
2. Language
|
|
106
|
+
|
|
107
|
+
Languages supported are English and Arabic. You can either set the desired language or not.
|
|
108
|
+
If you don’t set any language, it will default to English.
|
|
109
|
+
|
|
110
|
+
3. Fonts
|
|
111
|
+
|
|
112
|
+
We support customization of fonts. System and custom fonts can be set for the labels of each form view.
|
|
113
|
+
|
|
114
|
+
4. Card Attributes
|
|
115
|
+
|
|
116
|
+
Card Attributes is optional. It can be set if customization of the card details view is wanted.
|
|
117
|
+
|
|
118
|
+
We offer:
|
|
119
|
+
- Possibility to show or hide card details by default
|
|
120
|
+
|
|
121
|
+
To directly show the card details (not masked) when card view is displayed, we expect the ```shouldHide``` property to be set to false, otherwise to be set to false. If ```shouldHide``` property is not set, the default value is true.
|
|
122
|
+
|
|
123
|
+
```javascript
|
|
124
|
+
const cardAttributes = NICardAttributes(shouldHide: false)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- Background image customization
|
|
128
|
+
|
|
129
|
+
For the card background image, we expect a UIImage to be set. The recommended size would be 343 x 182.
|
|
130
|
+
|
|
131
|
+
```javascript
|
|
132
|
+
const backgroundImage: ImageURISource = require('../assets/images/background_image.png');
|
|
133
|
+
const cardAttributes = NICardAttributes(backgroundImage: image))
|
|
134
|
+
```
|
|
135
|
+
- Possibility to set the text position as grouped labels
|
|
136
|
+
|
|
137
|
+
The card details labels are grouped as follows:
|
|
138
|
+
- Card Number Group
|
|
139
|
+
|
|
140
|
+
- Expiry Date & CVV Group
|
|
141
|
+
|
|
142
|
+
- Card Holder Name Group
|
|
143
|
+
|
|
144
|
+
In order to set the position of the each group, we expect percentage (of card container view height and width) values to the following parameters: ```leftAlignment```, ```cardNumberGroupTopAlignment```, ```dateCvvGroupTopAlignment```, ```cardHolderNameGroupTopAlignment```
|
|
145
|
+
|
|
146
|
+
```javascript
|
|
147
|
+
const textPositioning: NICardDetailsTextPositioning = {
|
|
148
|
+
leftAlignment: 0.05,
|
|
149
|
+
cardNumberGroupTopAlignment: 0.4,
|
|
150
|
+
dateCvvGroupTopAlignment: 0.6,
|
|
151
|
+
cardHolderNameGroupTopAlignment: 0.8,
|
|
152
|
+
};
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
All are optional.
|
|
156
|
+
|
|
157
|
+
If all properties are wanted, initialization NICardAttributes is made with all properties.
|
|
158
|
+
|
|
159
|
+
```javascript
|
|
160
|
+
const backgroundImage: ImageURISource =
|
|
161
|
+
require('../assets/images/background_image.png');
|
|
162
|
+
const textPositioning: NICardDetailsTextPositioning = {
|
|
163
|
+
leftAlignment: 0.05,
|
|
164
|
+
cardNumberGroupTopAlignment: 0.4,
|
|
165
|
+
dateCvvGroupTopAlignment: 0.6,
|
|
166
|
+
cardHolderNameGroupTopAlignment: 0.8,
|
|
167
|
+
};
|
|
168
|
+
const cardAttributes = NICardAttributes(
|
|
169
|
+
shouldHide: false,
|
|
170
|
+
backgroundImage: image,
|
|
171
|
+
textPositioning: textPosition)
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
##### Display Card Details View
|
|
175
|
+
The form interface will display the card details in a View.
|
|
176
|
+
The card info displayed are: Card Number, Expiry Date, CVV and Cardholder Name.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
```javascript
|
|
180
|
+
import {
|
|
181
|
+
CardDetailsComponent,
|
|
182
|
+
type NIErrorResponse,
|
|
183
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
```javascript
|
|
187
|
+
<CardDetailsComponent
|
|
188
|
+
input={input}
|
|
189
|
+
callback={(
|
|
190
|
+
error: NIErrorResponse | null,
|
|
191
|
+
result: string | null = null
|
|
192
|
+
) => {
|
|
193
|
+
callback(); // implement your callback
|
|
194
|
+
}}
|
|
195
|
+
/>
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
##### Set PIN Form
|
|
200
|
+
A PIN-pad will be displayed into a separate View on a separate screen.
|
|
201
|
+
|
|
202
|
+
```javascript
|
|
203
|
+
import {
|
|
204
|
+
SetPinView,
|
|
205
|
+
type NIErrorResponse,
|
|
206
|
+
NIPinTypeEnum,
|
|
207
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
208
|
+
|
|
209
|
+
import { input } from ['path/to/your/object/config'];
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
by specifying the type (pin length)
|
|
213
|
+
|
|
214
|
+
```javascript
|
|
215
|
+
const type = NIPinTypeEnum.fourDigits;
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
```javascript
|
|
219
|
+
return (
|
|
220
|
+
<SetPinView
|
|
221
|
+
input={input}
|
|
222
|
+
type={type}
|
|
223
|
+
callback={(
|
|
224
|
+
error: NIErrorResponse | null,
|
|
225
|
+
result: string | null = null
|
|
226
|
+
) => {
|
|
227
|
+
callback(); // implement your callback
|
|
228
|
+
}}
|
|
229
|
+
/>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
or without specifying the type (pin length)
|
|
233
|
+
|
|
234
|
+
```javascript
|
|
235
|
+
return (
|
|
236
|
+
<SetPinView
|
|
237
|
+
input={TEST_INPUT}
|
|
238
|
+
callback={(
|
|
239
|
+
error: NIErrorResponse | null,
|
|
240
|
+
result: string | null = null
|
|
241
|
+
) => {
|
|
242
|
+
callback(); // implement your callback
|
|
243
|
+
}}
|
|
244
|
+
/>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
##### Change PIN Form
|
|
249
|
+
A PIN-pad will be displayed in a VIEW into a separate screen.
|
|
250
|
+
|
|
251
|
+
Change PIN is a two step flow:
|
|
252
|
+
1.Capture current PIN
|
|
253
|
+
2.Capture new PIN
|
|
254
|
+
|
|
255
|
+
```javascript
|
|
256
|
+
import {
|
|
257
|
+
ChangePinView,
|
|
258
|
+
type NIErrorResponse,
|
|
259
|
+
NIThemeEnum,
|
|
260
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
261
|
+
|
|
262
|
+
import { input } from ['path/to/your/object/config'];
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
by specifying the type (pin length)
|
|
266
|
+
|
|
267
|
+
```javascript
|
|
268
|
+
const type = NIPinTypeEnum.fourDigits;
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
```javascript
|
|
272
|
+
<ChangePinView
|
|
273
|
+
input={input}
|
|
274
|
+
type={type}
|
|
275
|
+
callback={(
|
|
276
|
+
error: NIErrorResponse | null,
|
|
277
|
+
result: string | null = null
|
|
278
|
+
) => {
|
|
279
|
+
console.log('ChangePinView', { error, result });
|
|
280
|
+
callback(); // implement your callback
|
|
281
|
+
}}
|
|
282
|
+
/>
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
or without specifying the type (pin length)
|
|
286
|
+
|
|
287
|
+
```javascript
|
|
288
|
+
<ChangePinView
|
|
289
|
+
input={input}
|
|
290
|
+
callback={(
|
|
291
|
+
error: NIErrorResponse | null,
|
|
292
|
+
result: string | null = null
|
|
293
|
+
) => {
|
|
294
|
+
console.log('ChangePinView', { error, result });
|
|
295
|
+
callback(); // implement your callback
|
|
296
|
+
}}
|
|
297
|
+
/>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
##### Verify PIN Form
|
|
302
|
+
A PIN-pad will be displayed in a View into a separate screen.
|
|
303
|
+
|
|
304
|
+
javascript:
|
|
305
|
+
```javascript
|
|
306
|
+
import {
|
|
307
|
+
VerifyPinView,
|
|
308
|
+
type NIErrorResponse,
|
|
309
|
+
NIPinTypeEnum,
|
|
310
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
311
|
+
|
|
312
|
+
import { input } from ['path/to/your/object/config'];
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
by specifying the type (pin length)
|
|
316
|
+
|
|
317
|
+
```javascript
|
|
318
|
+
const type = NIPinTypeEnum.fourDigits;
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
```javascript
|
|
322
|
+
<VerifyPinView
|
|
323
|
+
input={TEST_INPUT}
|
|
324
|
+
type={type}
|
|
325
|
+
callback={(
|
|
326
|
+
error: NIErrorResponse | null,
|
|
327
|
+
result: string | null = null
|
|
328
|
+
) => {
|
|
329
|
+
callback(); // implement your callback
|
|
330
|
+
}}
|
|
331
|
+
/>
|
|
332
|
+
```
|
|
333
|
+
or without specifying the type (pin length)
|
|
334
|
+
|
|
335
|
+
```javascript
|
|
336
|
+
<VerifyPinView
|
|
337
|
+
input={TEST_INPUT}
|
|
338
|
+
callback={(
|
|
339
|
+
error: NIErrorResponse | null,
|
|
340
|
+
result: string | null = null
|
|
341
|
+
) => {
|
|
342
|
+
callback(); // implement your callback
|
|
343
|
+
}}
|
|
344
|
+
/>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
#### Display as a view
|
|
348
|
+
The customer application can integrate Card Details and View Pin as a view into a UIViewController
|
|
349
|
+
|
|
350
|
+
##### Display Card Details View
|
|
351
|
+
A view of NICardView type can be added into a View, then set the input and start the flow as below:
|
|
352
|
+
|
|
353
|
+
```javascript
|
|
354
|
+
import {
|
|
355
|
+
ViewPinComponent,
|
|
356
|
+
type NIErrorResponse,
|
|
357
|
+
NIPinTypeEnum,
|
|
358
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
359
|
+
|
|
360
|
+
import { input } from ['path/to/your/object/config'];
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
by specifying the type (pin length)
|
|
364
|
+
|
|
365
|
+
```javascript
|
|
366
|
+
const type = NIPinTypeEnum.fourDigits;
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
```javascript
|
|
370
|
+
<ViewPinComponent
|
|
371
|
+
input={TEST_INPUT_VIEW_PIN}
|
|
372
|
+
type={type}
|
|
373
|
+
callback={(
|
|
374
|
+
error: NIErrorResponse | null,
|
|
375
|
+
result: string | null = null
|
|
376
|
+
) => {
|
|
377
|
+
callback(); // implement your callback
|
|
378
|
+
}}
|
|
379
|
+
/>
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
or without specifying the type (pin length)
|
|
383
|
+
|
|
384
|
+
```javascript
|
|
385
|
+
<ViewPinComponent
|
|
386
|
+
input={TEST_INPUT_VIEW_PIN}
|
|
387
|
+
callback={(
|
|
388
|
+
error: NIErrorResponse | null,
|
|
389
|
+
result: string | null = null
|
|
390
|
+
) => {
|
|
391
|
+
callback(); // implement your callback
|
|
392
|
+
}}
|
|
393
|
+
/>
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
Parameters:
|
|
398
|
+
- input - type NIInput - see the explanation above. This is a required parameter.
|
|
399
|
+
- __timer__ - type number - offers possibility to set the display time of the PIN, expressed in seconds. Using value "0" for this parameter, the PIN will be displayed indefinitely. After the countdown, the PIN will be masked.
|
|
400
|
+
This is a required parameter.
|
|
401
|
+
- the __timer__ property will be added at input object like below.
|
|
402
|
+
|
|
403
|
+
```javascript
|
|
404
|
+
export const input: NiInputInterface = {
|
|
405
|
+
bankCode: [yourBankCode],
|
|
406
|
+
cardIdentifierId: [cardIdentifierId],
|
|
407
|
+
cardIdentifierType: [cardIdentifierType],
|
|
408
|
+
connectionProperties: NIConnectionProperties = {
|
|
409
|
+
rootUrl: [rootUrl], token: [token],
|
|
410
|
+
},
|
|
411
|
+
displayAttributes: NIDisplayAttributes = {
|
|
412
|
+
theme: NIThemeEnum.light as themeType,
|
|
413
|
+
language: NILanguageEnum.english as languageType,
|
|
414
|
+
},
|
|
415
|
+
timer: 5,
|
|
416
|
+
};
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
##### Display View Pin View
|
|
421
|
+
|
|
422
|
+
A view of NIViewPinView type can be added into storyboard, then set the input and start the flow as below:
|
|
423
|
+
```javascript
|
|
424
|
+
import {
|
|
425
|
+
ViewPinView,
|
|
426
|
+
type NIErrorResponse,
|
|
427
|
+
NIPinTypeEnum,
|
|
428
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
429
|
+
|
|
430
|
+
import { input } from ['path/to/your/object/config'];
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
by specifying the type (pin length)
|
|
434
|
+
|
|
435
|
+
```javascript
|
|
436
|
+
const type = NIPinTypeEnum.fourDigits;
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
```javascript
|
|
440
|
+
<ViewPinView
|
|
441
|
+
input={TEST_INPUT_VIEW_PIN}
|
|
442
|
+
type={type}
|
|
443
|
+
callback={(
|
|
444
|
+
error: NIErrorResponse | null,
|
|
445
|
+
result: string | null = null
|
|
446
|
+
) => {
|
|
447
|
+
callback(); // implement your callback
|
|
448
|
+
}}
|
|
449
|
+
/>}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
or without specifying the type (pin length)
|
|
453
|
+
|
|
454
|
+
```javascript
|
|
455
|
+
<ViewPinView
|
|
456
|
+
input={TEST_INPUT_VIEW_PIN}
|
|
457
|
+
callback={(
|
|
458
|
+
error: NIErrorResponse | null,
|
|
459
|
+
result: string | null = null
|
|
460
|
+
) => {
|
|
461
|
+
callback(); // implement your callback
|
|
462
|
+
}}
|
|
463
|
+
/>}
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
#### Programatic Interface
|
|
468
|
+
The customer application will be responsible to handle the UI part.
|
|
469
|
+
|
|
470
|
+
##### Retrieve Card Details
|
|
471
|
+
The programmatic interface of the card details will return the card details in the getCardDetailsResult: NIGetCardSuccessResponse object.
|
|
472
|
+
The card info returned are: Card Number, Expiry Date, CVV and Cardholder Name.
|
|
473
|
+
|
|
474
|
+
javascript:
|
|
475
|
+
```javascript
|
|
476
|
+
import {
|
|
477
|
+
useGetCardDetails,
|
|
478
|
+
type NIErrorResponse,
|
|
479
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
480
|
+
|
|
481
|
+
import { input } from ['path/to/your/object/config'];
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
```javascript
|
|
485
|
+
React.useEffect(
|
|
486
|
+
() =>
|
|
487
|
+
onGetCardDetails(
|
|
488
|
+
input,
|
|
489
|
+
(error: NIErrorResponse | null, result: string | null = null) => {
|
|
490
|
+
callback(); // implement your callback
|
|
491
|
+
}
|
|
492
|
+
),
|
|
493
|
+
[]
|
|
494
|
+
);
|
|
495
|
+
|
|
496
|
+
const {
|
|
497
|
+
result: getCardDetailsResult,
|
|
498
|
+
error: getCardDetailsError,
|
|
499
|
+
isLoading,
|
|
500
|
+
onGetCardDetails,
|
|
501
|
+
} = useGetCardDetails();
|
|
502
|
+
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
##### Set PIN
|
|
507
|
+
The programmatic interface for the Set PIN functionality will return a success or failure response.
|
|
508
|
+
|
|
509
|
+
javascript:
|
|
510
|
+
```javascript
|
|
511
|
+
import {
|
|
512
|
+
useSetPin,
|
|
513
|
+
type NIErrorResponse,
|
|
514
|
+
NIThemeEnum,
|
|
515
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
516
|
+
|
|
517
|
+
import { input } from ['path/to/your/object/config'];
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
```javascript
|
|
521
|
+
const newPin = '1234';
|
|
522
|
+
|
|
523
|
+
React.useEffect(
|
|
524
|
+
() =>
|
|
525
|
+
onSetPin(
|
|
526
|
+
newPin,
|
|
527
|
+
input,
|
|
528
|
+
(error: NIErrorResponse | null, result: string | null = null) => {
|
|
529
|
+
callback(); // implement your callback
|
|
530
|
+
}
|
|
531
|
+
),
|
|
532
|
+
[]
|
|
533
|
+
);
|
|
534
|
+
|
|
535
|
+
const {
|
|
536
|
+
result: setPinResult,
|
|
537
|
+
error: setPinError,
|
|
538
|
+
isLoading,
|
|
539
|
+
onSetPin,
|
|
540
|
+
} = useSetPin();
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
##### Change PIN
|
|
545
|
+
The programmatic interface for the Change PIN functionality will return a success or failure response.
|
|
546
|
+
|
|
547
|
+
javascript:
|
|
548
|
+
```javascript
|
|
549
|
+
import {
|
|
550
|
+
useChangePin,
|
|
551
|
+
type NIErrorResponse,
|
|
552
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
553
|
+
|
|
554
|
+
import { input } from ['path/to/your/object/config'];
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
```javascript
|
|
558
|
+
const oldPin = '1234';
|
|
559
|
+
const newPin = '7890';
|
|
560
|
+
|
|
561
|
+
React.useEffect(
|
|
562
|
+
() =>
|
|
563
|
+
onChangePin(
|
|
564
|
+
oldPin,
|
|
565
|
+
newPin,
|
|
566
|
+
input,
|
|
567
|
+
(error: NIErrorResponse | null, result: string | null = null) => {
|
|
568
|
+
callback(); // implement your callback
|
|
569
|
+
}
|
|
570
|
+
),
|
|
571
|
+
[]
|
|
572
|
+
);
|
|
573
|
+
|
|
574
|
+
const {
|
|
575
|
+
result: changePinResult,
|
|
576
|
+
error: changePinError,
|
|
577
|
+
isLoading,
|
|
578
|
+
onChangePin,
|
|
579
|
+
} = useChangePin();
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
##### Verify PIN
|
|
584
|
+
The programmatic interface for the Verify PIN functionality will return a success or failure response.
|
|
585
|
+
|
|
586
|
+
javascript:
|
|
587
|
+
```javascript
|
|
588
|
+
import {
|
|
589
|
+
useVerifyPin,
|
|
590
|
+
type NIErrorResponse,
|
|
591
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
592
|
+
|
|
593
|
+
import { input } from ['path/to/your/object/config'];
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
```javascript
|
|
597
|
+
const pin = '1234';
|
|
598
|
+
|
|
599
|
+
React.useEffect(
|
|
600
|
+
() =>
|
|
601
|
+
onVerifyPin(
|
|
602
|
+
pin,
|
|
603
|
+
input,
|
|
604
|
+
(error: NIErrorResponse | null, result: string | null = null) => {
|
|
605
|
+
callback(); // implement your callback
|
|
606
|
+
}
|
|
607
|
+
),
|
|
608
|
+
[]
|
|
609
|
+
);
|
|
610
|
+
|
|
611
|
+
const {
|
|
612
|
+
result: verifyPinResult,
|
|
613
|
+
error: verifyPinError,
|
|
614
|
+
isLoading,
|
|
615
|
+
onVerifyPin,
|
|
616
|
+
} = useVerifyPin();
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
##### View PIN
|
|
621
|
+
The programmatic interface for the View PIN functionality will return in __viewPinResult__ as a String value representing the PIN or failure response.
|
|
622
|
+
|
|
623
|
+
javascript:
|
|
624
|
+
```javascript
|
|
625
|
+
import {
|
|
626
|
+
useViewPin,
|
|
627
|
+
type NIErrorResponse,
|
|
628
|
+
} from '@networkinternational/ni-card-management-sdk';
|
|
629
|
+
|
|
630
|
+
import { input } from ['path/to/your/object/config'];
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
```javascript
|
|
634
|
+
React.useEffect(
|
|
635
|
+
() =>
|
|
636
|
+
onViewPin(
|
|
637
|
+
input,
|
|
638
|
+
(error: NIErrorResponse | null, result: string | null = null) => {
|
|
639
|
+
callback(); // implement your callback
|
|
640
|
+
}
|
|
641
|
+
),
|
|
642
|
+
[]
|
|
643
|
+
);
|
|
644
|
+
|
|
645
|
+
const {
|
|
646
|
+
result: viewPinResult,
|
|
647
|
+
error: viewPinError,
|
|
648
|
+
isLoading,
|
|
649
|
+
onViewPin,
|
|
650
|
+
} = useViewPin();
|
|
651
|
+
```
|