omnipay-reactnative-sdk 1.2.2-beta.8 → 1.2.3-beta.0

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.
Files changed (66) hide show
  1. package/README.md +43 -93
  2. package/android/build.gradle +0 -9
  3. package/android/src/main/AndroidManifest.xml +0 -5
  4. package/android/src/main/java/com/omniretail/omnipay/OmnipayActivityPackage.java +1 -4
  5. package/lib/commonjs/components/OmnipayProvider.js +1 -1
  6. package/lib/commonjs/components/biometrics/FaceVerification.js +235 -275
  7. package/lib/commonjs/components/biometrics/FaceVerification.js.map +1 -1
  8. package/lib/commonjs/index.js +0 -33
  9. package/lib/commonjs/index.js.map +1 -1
  10. package/lib/module/components/OmnipayProvider.js +1 -1
  11. package/lib/module/components/biometrics/FaceVerification.js +237 -277
  12. package/lib/module/components/biometrics/FaceVerification.js.map +1 -1
  13. package/lib/module/index.js +0 -6
  14. package/lib/module/index.js.map +1 -1
  15. package/lib/typescript/components/biometrics/FaceVerification.d.ts +1 -3
  16. package/lib/typescript/components/biometrics/FaceVerification.d.ts.map +1 -1
  17. package/lib/typescript/index.d.ts +0 -2
  18. package/lib/typescript/index.d.ts.map +1 -1
  19. package/package.json +4 -2
  20. package/src/components/OmnipayProvider.tsx +1 -1
  21. package/src/components/biometrics/FaceVerification.tsx +232 -317
  22. package/src/index.tsx +0 -7
  23. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraView.java +0 -153
  24. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraViewManager.java +0 -49
  25. package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessModule.java +0 -557
  26. package/ios/OmnipayLivenessCameraView.h +0 -15
  27. package/ios/OmnipayLivenessCameraView.m +0 -80
  28. package/ios/OmnipayLivenessCameraViewManager.m +0 -19
  29. package/ios/OmnipayLivenessModule.h +0 -38
  30. package/ios/OmnipayLivenessModule.m +0 -615
  31. package/lib/commonjs/components/biometrics/LivenessDetection.js +0 -149
  32. package/lib/commonjs/components/biometrics/LivenessDetection.js.map +0 -1
  33. package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js +0 -15
  34. package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js.map +0 -1
  35. package/lib/commonjs/components/biometrics/PermissionManager.js +0 -279
  36. package/lib/commonjs/components/biometrics/PermissionManager.js.map +0 -1
  37. package/lib/commonjs/components/biometrics/index.js +0 -45
  38. package/lib/commonjs/components/biometrics/index.js.map +0 -1
  39. package/lib/commonjs/components/biometrics/types.js +0 -17
  40. package/lib/commonjs/components/biometrics/types.js.map +0 -1
  41. package/lib/module/components/biometrics/LivenessDetection.js +0 -129
  42. package/lib/module/components/biometrics/LivenessDetection.js.map +0 -1
  43. package/lib/module/components/biometrics/OmnipayLivenessCameraView.js +0 -7
  44. package/lib/module/components/biometrics/OmnipayLivenessCameraView.js.map +0 -1
  45. package/lib/module/components/biometrics/PermissionManager.js +0 -272
  46. package/lib/module/components/biometrics/PermissionManager.js.map +0 -1
  47. package/lib/module/components/biometrics/index.js +0 -12
  48. package/lib/module/components/biometrics/index.js.map +0 -1
  49. package/lib/module/components/biometrics/types.js +0 -16
  50. package/lib/module/components/biometrics/types.js.map +0 -1
  51. package/lib/typescript/components/biometrics/LivenessDetection.d.ts +0 -33
  52. package/lib/typescript/components/biometrics/LivenessDetection.d.ts.map +0 -1
  53. package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts +0 -18
  54. package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts.map +0 -1
  55. package/lib/typescript/components/biometrics/PermissionManager.d.ts +0 -58
  56. package/lib/typescript/components/biometrics/PermissionManager.d.ts.map +0 -1
  57. package/lib/typescript/components/biometrics/index.d.ts +0 -5
  58. package/lib/typescript/components/biometrics/index.d.ts.map +0 -1
  59. package/lib/typescript/components/biometrics/types.d.ts +0 -73
  60. package/lib/typescript/components/biometrics/types.d.ts.map +0 -1
  61. package/omnipay-reactnative-sdk.podspec +0 -50
  62. package/src/components/biometrics/LivenessDetection.ts +0 -178
  63. package/src/components/biometrics/OmnipayLivenessCameraView.tsx +0 -19
  64. package/src/components/biometrics/PermissionManager.ts +0 -317
  65. package/src/components/biometrics/index.ts +0 -11
  66. package/src/components/biometrics/types.ts +0 -86
package/README.md CHANGED
@@ -1,17 +1,6 @@
1
1
  # omnipay-reactnative-sdk
2
2
 
3
- Omnipay react native sdk with **Liveness Detection** support
4
-
5
- ## Features
6
-
7
- - **Payment Processing** - Complete payment flow integration
8
- - **User Registration & BVN Verification** - User onboarding flows
9
- - **🆕 Liveness Detection** - Real-time face verification using ML Kit (Android) and Vision Framework (iOS)
10
- - Smile detection
11
- - Blink detection
12
- - Head turn challenges
13
- - Native camera integration
14
- - Cross-platform support
3
+ Omnipay react native sdk
15
4
 
16
5
  ## Installation
17
6
 
@@ -25,8 +14,6 @@ yarn add omnipay-reactnative-sdk
25
14
  yarn add react-native-select-contact react-native-webview react-native-share
26
15
  ```
27
16
 
28
- **Note:** Liveness detection requires no additional dependencies. Camera permissions and native modules are handled automatically - no permission management code needed in your app.
29
-
30
17
  Make sure your manifest files includes permission to read contacts
31
18
 
32
19
  ```sh
@@ -115,48 +102,45 @@ initiateWallet({
115
102
  ### Properties
116
103
 
117
104
  #### OmnipayProvider Props
118
-
119
- | Name | Type | Description |
120
- | --------- | ------ | ------------------------------------ |
121
- | color | String | color of primary buttons and links |
122
- | env | String | dev or prod |
123
- | publicKey | String | public key of the company on omnipay |
105
+ | Name | Type | Description |
106
+ | --------------- | -------- | -------------------------------------------------------- |
107
+ | color | String | color of primary buttons and links |
108
+ | env | String | dev or prod |
109
+ | publicKey | String | public key of the company on omnipay |
124
110
 
125
111
  #### initiateBills Props
126
-
127
- | Name | Type | Description |
128
- | ----------- | -------- | ---------------------------------------------- |
129
- | phoneNumber | String | phone number of the customer |
130
- | onClose | Function | this is used to notify you when the sdk closes |
112
+ | Name | Type | Description |
113
+ | --------------- | -------- | -------------------------------------------------------- |
114
+ | phoneNumber | String | phone number of the customer |
115
+ | onClose | Function | this is used to notify you when the sdk closes |
131
116
 
132
117
  #### initiateWallet Props
118
+ | Name | Type | Description |
119
+ | ----------------------- | -------- | ---------------------------------------------------------------- |
120
+ | phoneNumber | String | phone number of the customer |
121
+ | customerRef | String | unique reference for the customer |
122
+ | userRef | String | unique reference for the user |
123
+ | onClose | Function | this is used to notify you when the sdk closes |
124
+ | usesPaylater | Boolean | whether to show paylater tab in wallet view |
125
+ | usesPromo | Boolean | whether to show promo tab in wallet view |
126
+ | usesAirtimeData | Boolean | whether to show airtime and data shortcut in wallet view |
127
+ | usesTransfer | Boolean | whether to show transfer shortcut in wallet view |
128
+ | usesBills | Boolean | whether to show bills shortcut in wallet view |
129
+ | usesPos | Boolean | whether to show pos shortcut in wallet view |
130
+ | promoBalanceOffset | Number | offset for promo balance display |
131
+ | deviceId | String | unique identifier for the device |
132
+ | deviceName | String | name of the device |
133
+ | hideWalletTransfer | Boolean | whether to hide wallet transfer functionality |
134
+ | isBvnValidationRequired | Boolean | whether BVN validation is required |
135
+ | walletTab | String | initial wallet tab to display ('Paylater', 'Account', 'Omoni') |
136
+ | sessionId | String | unique session identifier |
137
+ | kycStatus | String | KYC status of the user ('verified', 'unverified') |
138
+ | launchPage | String | page to launch in the wallet |
133
139
 
134
- | Name | Type | Description |
135
- | ----------------------- | -------- | -------------------------------------------------------------- |
136
- | phoneNumber | String | phone number of the customer |
137
- | customerRef | String | unique reference for the customer |
138
- | userRef | String | unique reference for the user |
139
- | onClose | Function | this is used to notify you when the sdk closes |
140
- | usesPaylater | Boolean | whether to show paylater tab in wallet view |
141
- | usesPromo | Boolean | whether to show promo tab in wallet view |
142
- | usesAirtimeData | Boolean | whether to show airtime and data shortcut in wallet view |
143
- | usesTransfer | Boolean | whether to show transfer shortcut in wallet view |
144
- | usesBills | Boolean | whether to show bills shortcut in wallet view |
145
- | usesPos | Boolean | whether to show pos shortcut in wallet view |
146
- | promoBalanceOffset | Number | offset for promo balance display |
147
- | deviceId | String | unique identifier for the device |
148
- | deviceName | String | name of the device |
149
- | hideWalletTransfer | Boolean | whether to hide wallet transfer functionality |
150
- | isBvnValidationRequired | Boolean | whether BVN validation is required |
151
- | walletTab | String | initial wallet tab to display ('Paylater', 'Account', 'Omoni') |
152
- | sessionId | String | unique session identifier |
153
- | kycStatus | String | KYC status of the user ('verified', 'unverified') |
154
- | launchPage | String | page to launch in the wallet |
155
140
 
156
141
  ## Registration Sdk
157
-
158
142
  ```js
159
- import { Omnipay } from 'omnipay-reactnative-sdk';
143
+ import { Omnipay } from "omnipay-reactnative-sdk";
160
144
 
161
145
  //render it anywhere on your page where you want to display the registration sdk
162
146
  <Omnipay.Registration
@@ -166,9 +150,9 @@ import { Omnipay } from 'omnipay-reactnative-sdk';
166
150
  phoneNumber="09031234571"
167
151
  onRegistrationSuccessful={({ customerRef, walletId }) => {
168
152
  /**
169
- * the customer ref and walletid can be saved
153
+ * the customer ref and walletid can be saved
170
154
  * to your database at this point
171
- *
155
+ *
172
156
  * we will also be sending a webhook notification
173
157
  * so, you can either save at this point or via the webhook
174
158
  */
@@ -179,51 +163,17 @@ import { Omnipay } from 'omnipay-reactnative-sdk';
179
163
  * the user is done with registration.
180
164
  * you can navigate them else where at this point
181
165
  */
166
+
182
167
  }}
183
- />;
168
+ />
184
169
  ```
185
170
 
186
171
  ### Properties
187
172
 
188
- | Name | Type | Description |
189
- | ----------- | ------ | ------------------------------------ |
190
- | color | String | color of primary buttons and links |
191
- | env | String | dev or prod |
192
- | phoneNumber | String | phone number of the customer |
193
- | publicKey | String | public key of the company on omnipay |
194
- | view | String | the view to render on the sdk |
195
-
196
- ## Liveness Detection
197
-
198
- The SDK now includes advanced liveness detection capabilities for secure face verification.
199
-
200
- ### Quick Start
201
-
202
- ```typescript
203
- import React from 'react';
204
- import { OmnipayProvider } from 'omnipay-reactnative-sdk';
205
-
206
- function MyApp() {
207
- return (
208
- <OmnipayProvider publicKey="your-public-key" env="dev" color="#007AFF">
209
- <YourAppContent />
210
- </OmnipayProvider>
211
- );
212
- }
213
- ```
214
-
215
- Face verification with liveness detection is **automatically integrated** and will appear as part of the SDK flow when needed. No additional setup or modal management required!
216
-
217
- ### Features
218
-
219
- - **Real-time face detection** using ML Kit (Android) and Vision Framework (iOS)
220
- - **Multiple challenge types**: Smile, Blink, Head Turn Left/Right
221
- - **Configurable timeouts** and challenge sequences
222
- - **Native camera integration** with optimal performance
223
- - **Automatic permission handling** - no additional setup required
224
- - **Event-driven callbacks** for complete control
225
- - **Base64 screenshot capture** after successful verification
226
-
227
- ### Documentation
228
-
229
- For complete liveness detection documentation, see [LIVENESS_DETECTION.md](./LIVENESS_DETECTION.md)
173
+ | Name | Type | Description |
174
+ | --------------- | -------- | -------------------------------------------------------- |
175
+ | color | String | color of primary buttons and links |
176
+ | env | String | dev or prod |
177
+ | phoneNumber | String | phone number of the customer |
178
+ | publicKey | String | public key of the company on omnipay |
179
+ | view | String | the view to render on the sdk |
@@ -48,13 +48,4 @@ repositories {
48
48
 
49
49
  dependencies {
50
50
  implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
51
-
52
- // ML Kit dependencies for liveness detection
53
- implementation 'com.google.mlkit:face-detection:16.1.6'
54
-
55
- // CameraX dependencies for camera handling
56
- implementation "androidx.camera:camera-core:1.3.1"
57
- implementation "androidx.camera:camera-camera2:1.3.1"
58
- implementation "androidx.camera:camera-lifecycle:1.3.1"
59
- implementation "androidx.camera:camera-view:1.3.1"
60
51
  }
@@ -1,11 +1,6 @@
1
1
  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
2
  package="com.omniretail.omnipay">
3
3
 
4
- <!-- Camera permissions for liveness detection -->
5
- <uses-permission android:name="android.permission.CAMERA" />
6
- <uses-feature android:name="android.hardware.camera" android:required="false" />
7
- <uses-feature android:name="android.hardware.camera.front" android:required="false" />
8
-
9
4
  <application>
10
5
  <service
11
6
  android:name=".OmnipayActivityModule"
@@ -16,15 +16,12 @@ public class OmnipayActivityPackage implements ReactPackage {
16
16
  public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
17
17
  List<NativeModule> modules = new ArrayList<>();
18
18
  modules.add(new OmnipayActivityModule(reactContext));
19
- modules.add(new OmnipayLivenessModule(reactContext));
20
19
  return modules;
21
20
  }
22
21
 
23
22
  @Override
24
23
  public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
25
- List<ViewManager> viewManagers = new ArrayList<>();
26
- viewManagers.add(new OmnipayLivenessCameraViewManager(reactContext));
27
- return viewManagers;
24
+ return Collections.emptyList();
28
25
  }
29
26
 
30
27
  // Deprecated RN 0.47
@@ -38,7 +38,7 @@ const OmnipayProvider = ({
38
38
  (0, _react.useEffect)(() => {
39
39
  setTimeout(() => {
40
40
  setShowFaceVerification(true);
41
- }, 4000);
41
+ }, 1000);
42
42
  }, []);
43
43
  (0, _react.useEffect)(() => {
44
44
  visibilityRef.current = isVisible;