omnipay-reactnative-sdk 1.2.2-beta.4 → 1.2.2-beta.6
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/README.md +93 -43
- package/android/build.gradle +16 -15
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/omniretail/omnipay/OmnipayActivityPackage.java +2 -2
- package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraView.java +153 -0
- package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessCameraViewManager.java +49 -0
- package/android/src/main/java/com/omniretail/omnipay/OmnipayLivenessModule.java +524 -0
- package/ios/OmnipayLivenessCameraView.h +15 -0
- package/ios/OmnipayLivenessCameraView.m +80 -0
- package/ios/OmnipayLivenessCameraViewManager.m +19 -0
- package/ios/OmnipayLivenessModule.h +38 -0
- package/ios/OmnipayLivenessModule.m +554 -0
- package/lib/commonjs/components/OmnipayProvider.js +2 -66
- package/lib/commonjs/components/OmnipayProvider.js.map +1 -1
- package/lib/commonjs/components/OmnipayView.js.map +1 -1
- package/lib/commonjs/components/biometrics/FaceVerification.js +252 -345
- package/lib/commonjs/components/biometrics/FaceVerification.js.map +1 -1
- package/lib/commonjs/components/biometrics/LivenessDetection.js +90 -198
- package/lib/commonjs/components/biometrics/LivenessDetection.js.map +1 -1
- package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js +15 -0
- package/lib/commonjs/components/biometrics/OmnipayLivenessCameraView.js.map +1 -0
- package/lib/commonjs/components/biometrics/PermissionManager.js +279 -0
- package/lib/commonjs/components/biometrics/PermissionManager.js.map +1 -0
- package/lib/commonjs/components/biometrics/index.js +45 -0
- package/lib/commonjs/components/biometrics/index.js.map +1 -0
- package/lib/commonjs/components/biometrics/types.js +17 -0
- package/lib/commonjs/components/biometrics/types.js.map +1 -0
- package/lib/commonjs/components/views/BvnVerification.js.map +1 -1
- package/lib/commonjs/components/views/PaylaterAgreement.js.map +1 -1
- package/lib/commonjs/components/views/Registration.js.map +1 -1
- package/lib/commonjs/index.js +23 -18
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/OmnipayProvider.js +3 -67
- package/lib/module/components/OmnipayProvider.js.map +1 -1
- package/lib/module/components/OmnipayView.js.map +1 -1
- package/lib/module/components/biometrics/FaceVerification.js +254 -346
- package/lib/module/components/biometrics/FaceVerification.js.map +1 -1
- package/lib/module/components/biometrics/LivenessDetection.js +75 -197
- package/lib/module/components/biometrics/LivenessDetection.js.map +1 -1
- package/lib/module/components/biometrics/OmnipayLivenessCameraView.js +7 -0
- package/lib/module/components/biometrics/OmnipayLivenessCameraView.js.map +1 -0
- package/lib/module/components/biometrics/PermissionManager.js +272 -0
- package/lib/module/components/biometrics/PermissionManager.js.map +1 -0
- package/lib/module/components/biometrics/index.js +12 -0
- package/lib/module/components/biometrics/index.js.map +1 -0
- package/lib/module/components/biometrics/types.js +16 -0
- package/lib/module/components/biometrics/types.js.map +1 -0
- package/lib/module/components/views/BvnVerification.js.map +1 -1
- package/lib/module/components/views/PaylaterAgreement.js.map +1 -1
- package/lib/module/components/views/Registration.js.map +1 -1
- package/lib/module/index.js +5 -4
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/{src/components → components}/OmnipayProvider.d.ts +1 -1
- package/lib/typescript/components/OmnipayProvider.d.ts.map +1 -0
- package/lib/typescript/{src/components → components}/OmnipayView.d.ts +21 -20
- package/lib/typescript/components/OmnipayView.d.ts.map +1 -0
- package/lib/typescript/components/biometrics/FaceVerification.d.ts +11 -0
- package/lib/typescript/components/biometrics/FaceVerification.d.ts.map +1 -0
- package/lib/typescript/components/biometrics/LivenessDetection.d.ts +33 -0
- package/lib/typescript/components/biometrics/LivenessDetection.d.ts.map +1 -0
- package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts +18 -0
- package/lib/typescript/components/biometrics/OmnipayLivenessCameraView.d.ts.map +1 -0
- package/lib/typescript/components/biometrics/PermissionManager.d.ts +58 -0
- package/lib/typescript/components/biometrics/PermissionManager.d.ts.map +1 -0
- package/lib/typescript/components/biometrics/index.d.ts +5 -0
- package/lib/typescript/components/biometrics/index.d.ts.map +1 -0
- package/lib/typescript/components/biometrics/types.d.ts +73 -0
- package/lib/typescript/components/biometrics/types.d.ts.map +1 -0
- package/lib/typescript/{src/components → components}/views/BvnVerification.d.ts +2 -1
- package/lib/typescript/components/views/BvnVerification.d.ts.map +1 -0
- package/lib/typescript/{src/components → components}/views/PaylaterAgreement.d.ts +2 -1
- package/lib/typescript/components/views/PaylaterAgreement.d.ts.map +1 -0
- package/lib/typescript/{src/components → components}/views/Registration.d.ts +2 -1
- package/lib/typescript/components/views/Registration.d.ts.map +1 -0
- package/lib/typescript/functions.d.ts.map +1 -0
- package/lib/typescript/hooks/useOmnipay.d.ts +28 -0
- package/lib/typescript/hooks/useOmnipay.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +7 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/lib/colors.d.ts.map +1 -0
- package/lib/typescript/lib/config.d.ts.map +1 -0
- package/omnipay-reactnative-sdk.podspec +32 -29
- package/package.json +15 -10
- package/src/components/OmnipayProvider.tsx +3 -106
- package/src/components/OmnipayView.tsx +1 -1
- package/src/components/biometrics/FaceVerification.tsx +291 -368
- package/src/components/biometrics/LivenessDetection.ts +113 -250
- package/src/components/biometrics/OmnipayLivenessCameraView.tsx +19 -0
- package/src/components/biometrics/PermissionManager.ts +317 -0
- package/src/components/biometrics/index.ts +11 -0
- package/src/components/biometrics/types.ts +86 -0
- package/src/components/views/BvnVerification.tsx +1 -1
- package/src/components/views/PaylaterAgreement.tsx +1 -1
- package/src/components/views/Registration.tsx +1 -1
- package/src/index.tsx +4 -15
- package/android/src/main/java/com/omniretail/omnipay/LivenessCameraViewManager.java +0 -116
- package/android/src/main/java/com/omniretail/omnipay/LivenessDetectionModule.java +0 -588
- package/ios/LivenessCameraView.h +0 -22
- package/ios/LivenessCameraView.m +0 -135
- package/ios/LivenessCameraViewManager.h +0 -12
- package/ios/LivenessCameraViewManager.m +0 -24
- package/ios/LivenessDetectionModule.h +0 -46
- package/ios/LivenessDetectionModule.m +0 -603
- package/lib/commonjs/components/biometrics/LivenessCameraView.js +0 -45
- package/lib/commonjs/components/biometrics/LivenessCameraView.js.map +0 -1
- package/lib/module/components/biometrics/LivenessCameraView.js +0 -39
- package/lib/module/components/biometrics/LivenessCameraView.js.map +0 -1
- package/lib/typescript/demo/src/App.d.ts +0 -3
- package/lib/typescript/demo/src/App.d.ts.map +0 -1
- package/lib/typescript/demo/src/Body.d.ts +0 -3
- package/lib/typescript/demo/src/Body.d.ts.map +0 -1
- package/lib/typescript/demo/src/NotificationsExample.d.ts +0 -4
- package/lib/typescript/demo/src/NotificationsExample.d.ts.map +0 -1
- package/lib/typescript/src/components/OmnipayProvider.d.ts.map +0 -1
- package/lib/typescript/src/components/OmnipayView.d.ts.map +0 -1
- package/lib/typescript/src/components/biometrics/FaceVerification.d.ts +0 -12
- package/lib/typescript/src/components/biometrics/FaceVerification.d.ts.map +0 -1
- package/lib/typescript/src/components/biometrics/LivenessCameraView.d.ts +0 -22
- package/lib/typescript/src/components/biometrics/LivenessCameraView.d.ts.map +0 -1
- package/lib/typescript/src/components/biometrics/LivenessDetection.d.ts +0 -73
- package/lib/typescript/src/components/biometrics/LivenessDetection.d.ts.map +0 -1
- package/lib/typescript/src/components/views/BvnVerification.d.ts.map +0 -1
- package/lib/typescript/src/components/views/PaylaterAgreement.d.ts.map +0 -1
- package/lib/typescript/src/components/views/Registration.d.ts.map +0 -1
- package/lib/typescript/src/functions.d.ts.map +0 -1
- package/lib/typescript/src/hooks/useOmnipay.d.ts +0 -28
- package/lib/typescript/src/hooks/useOmnipay.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -8
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/lib/colors.d.ts.map +0 -1
- package/lib/typescript/src/lib/config.d.ts.map +0 -1
- package/src/components/biometrics/LivenessCameraView.tsx +0 -61
- /package/lib/typescript/{src/functions.d.ts → functions.d.ts} +0 -0
- /package/lib/typescript/{src/lib → lib}/colors.d.ts +0 -0
- /package/lib/typescript/{src/lib → lib}/config.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PermissionManager.d.ts","sourceRoot":"","sources":["../../../../src/components/biometrics/PermissionManager.ts"],"names":[],"mappings":"AAGA,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,WAAW,gBAAgB;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,gBAAgB,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,uBAAuB;IAClC;;OAEG;WACU,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAkBjE;;OAEG;WACU,uBAAuB,CAClC,aAAa,GAAE,OAAc,GAC5B,OAAO,CAAC,kBAAkB,CAAC;IA4C9B;;OAEG;mBACkB,4BAA4B;IAoBjD;;OAEG;mBACkB,8BAA8B;IAqDnD;;OAEG;mBACkB,wBAAwB;IA4B7C;;OAEG;mBACkB,0BAA0B;IAW/C;;OAEG;WACU,gBAAgB,CAC3B,UAAU,GAAE,MAAU,GACrB,OAAO,CAAC,kBAAkB,CAAC;IA2B9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAqBtC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAiBzC;;OAEG;IACH,MAAM,CAAC,0BAA0B,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM;IAenE;;OAEG;WACU,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC;CAQ3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/biometrics/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare enum LivenessChallenge {
|
|
2
|
+
SMILE = "smile",
|
|
3
|
+
BLINK = "blink",
|
|
4
|
+
TURN_LEFT = "turnLeft",
|
|
5
|
+
TURN_RIGHT = "turnRight"
|
|
6
|
+
}
|
|
7
|
+
export interface LivenessConfig {
|
|
8
|
+
/** Which challenges to include in the detection flow */
|
|
9
|
+
challenges?: LivenessChallenge[];
|
|
10
|
+
/** Timeout in seconds for each challenge (default: 10) */
|
|
11
|
+
challengeTimeout?: number;
|
|
12
|
+
/** Total timeout in seconds for entire flow (default: 60) */
|
|
13
|
+
totalTimeout?: number;
|
|
14
|
+
/** Enable debug mode with visual feedback */
|
|
15
|
+
debugMode?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface LivenessResult {
|
|
18
|
+
/** Whether all challenges were completed successfully */
|
|
19
|
+
success: boolean;
|
|
20
|
+
/** Base64 encoded final screenshot after completion */
|
|
21
|
+
screenshot?: string;
|
|
22
|
+
/** Results for each individual challenge */
|
|
23
|
+
challengeResults: ChallengeResult[];
|
|
24
|
+
/** Total time taken in milliseconds */
|
|
25
|
+
totalDuration: number;
|
|
26
|
+
/** Reason for failure if unsuccessful */
|
|
27
|
+
failureReason?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ChallengeResult {
|
|
30
|
+
/** The challenge that was performed */
|
|
31
|
+
challenge: LivenessChallenge;
|
|
32
|
+
/** Whether this specific challenge was successful */
|
|
33
|
+
success: boolean;
|
|
34
|
+
/** Time taken for this challenge in milliseconds */
|
|
35
|
+
duration: number;
|
|
36
|
+
/** Confidence score (0-1) if available */
|
|
37
|
+
confidence?: number;
|
|
38
|
+
}
|
|
39
|
+
export interface LivenessEventCallbacks {
|
|
40
|
+
/** Called when a challenge starts */
|
|
41
|
+
onChallengeStart?: (challenge: LivenessChallenge) => void;
|
|
42
|
+
/** Called when a challenge is completed successfully */
|
|
43
|
+
onChallengeSuccess?: (challenge: LivenessChallenge, result: ChallengeResult) => void;
|
|
44
|
+
/** Called when a challenge fails */
|
|
45
|
+
onChallengeFailure?: (challenge: LivenessChallenge, reason: string) => void;
|
|
46
|
+
/** Called when all challenges are completed */
|
|
47
|
+
onAllChallengesComplete?: () => void;
|
|
48
|
+
/** Called when the final screenshot is captured */
|
|
49
|
+
onScreenshotCaptured?: (screenshot: string) => void;
|
|
50
|
+
/** Called when detection is cancelled or fails */
|
|
51
|
+
onDetectionFailed?: (reason: string) => void;
|
|
52
|
+
}
|
|
53
|
+
export interface LivenessNativeModule {
|
|
54
|
+
/** Start the liveness detection flow */
|
|
55
|
+
startLivenessDetection(config: LivenessConfig): Promise<LivenessResult>;
|
|
56
|
+
/** Stop the current detection */
|
|
57
|
+
stopDetection(): Promise<void>;
|
|
58
|
+
/** Check if the device supports liveness detection */
|
|
59
|
+
isSupported(): Promise<boolean>;
|
|
60
|
+
}
|
|
61
|
+
export interface LivenessDetectionProps extends LivenessEventCallbacks {
|
|
62
|
+
/** Whether the liveness detection modal is visible */
|
|
63
|
+
visible: boolean;
|
|
64
|
+
/** Called when user closes the modal */
|
|
65
|
+
onClose: () => void;
|
|
66
|
+
/** Called when liveness detection completes successfully */
|
|
67
|
+
onSuccess: (result: LivenessResult) => void;
|
|
68
|
+
/** Configuration for the liveness detection */
|
|
69
|
+
config?: LivenessConfig;
|
|
70
|
+
/** Primary color for UI elements */
|
|
71
|
+
primaryColor?: string;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/biometrics/types.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,SAAS,aAAa;IACtB,UAAU,cAAc;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,wDAAwD;IACxD,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,OAAO,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,gBAAgB,EAAE,eAAe,EAAE,CAAC;IACpC,uCAAuC;IACvC,aAAa,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,WAAW,sBAAsB;IACrC,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC1D,wDAAwD;IACxD,kBAAkB,CAAC,EAAE,CACnB,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,eAAe,KACpB,IAAI,CAAC;IACV,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5E,+CAA+C;IAC/C,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,mDAAmD;IACnD,oBAAoB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAGD,MAAM,WAAW,oBAAoB;IACnC,wCAAwC;IACxC,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IACxE,iCAAiC;IACjC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,sDAAsD;IACtD,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;CACjC;AAGD,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB;IACpE,sDAAsD;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4DAA4D;IAC5D,SAAS,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC5C,+CAA+C;IAC/C,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type OmnipayProps = {
|
|
2
3
|
color: string;
|
|
3
4
|
env: 'dev' | 'prod';
|
|
@@ -7,6 +8,6 @@ type OmnipayProps = {
|
|
|
7
8
|
onVerificationSuccessful?: () => void;
|
|
8
9
|
onClose?: () => void;
|
|
9
10
|
};
|
|
10
|
-
export declare const BvnVerification: ({ color, env, publicKey, phoneNumber, onVerificationSuccessful, onClose, customerRef, }: OmnipayProps) => JSX.Element;
|
|
11
|
+
export declare const BvnVerification: ({ color, env, publicKey, phoneNumber, onVerificationSuccessful, onClose, customerRef, }: OmnipayProps) => React.JSX.Element;
|
|
11
12
|
export {};
|
|
12
13
|
//# sourceMappingURL=BvnVerification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BvnVerification.d.ts","sourceRoot":"","sources":["../../../../src/components/views/BvnVerification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAW1D,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,KAAK,GAAG,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB,CAAC,EAAE,MAAM,IAAI,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAIF,eAAO,MAAM,eAAe,GAAI,yFAQ7B,YAAY,KAAG,KAAK,CAAC,GAAG,CAAC,OA6F3B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type AgreementSubmittedType = {
|
|
2
3
|
agreementId: string;
|
|
3
4
|
};
|
|
@@ -14,6 +15,6 @@ type OmnipayProps = {
|
|
|
14
15
|
onAgreementAccepted: ({ agreementId }: AgreementSubmittedType) => void;
|
|
15
16
|
onClose?: () => void;
|
|
16
17
|
};
|
|
17
|
-
export declare const PaylaterAgreement: ({ color, env, publicKey, phoneNumber, onAgreementAccepted, customerRef, amount, lenderId, feesId, sublimitId, onClose, }: OmnipayProps) => JSX.Element;
|
|
18
|
+
export declare const PaylaterAgreement: ({ color, env, publicKey, phoneNumber, onAgreementAccepted, customerRef, amount, lenderId, feesId, sublimitId, onClose, }: OmnipayProps) => React.JSX.Element;
|
|
18
19
|
export {};
|
|
19
20
|
//# sourceMappingURL=PaylaterAgreement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaylaterAgreement.d.ts","sourceRoot":"","sources":["../../../../src/components/views/PaylaterAgreement.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAW1D,KAAK,sBAAsB,GAAG;IAC5B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,KAAK,GAAG,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,sBAAsB,KAAK,IAAI,CAAC;IACvE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAIF,eAAO,MAAM,iBAAiB,GAAI,0HAY/B,YAAY,KAAG,KAAK,CAAC,GAAG,CAAC,OA+F3B,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
type RegisterSuccessType = {
|
|
2
3
|
customerRef: string;
|
|
3
4
|
walletId: string;
|
|
@@ -10,6 +11,6 @@ type OmnipayProps = {
|
|
|
10
11
|
onRegistrationSuccessful?: ({ customerRef, walletId, }: RegisterSuccessType) => void;
|
|
11
12
|
onClose?: () => void;
|
|
12
13
|
};
|
|
13
|
-
export declare const Registration: ({ color, env, publicKey, phoneNumber, onRegistrationSuccessful, onClose, }: OmnipayProps) => JSX.Element;
|
|
14
|
+
export declare const Registration: ({ color, env, publicKey, phoneNumber, onRegistrationSuccessful, onClose, }: OmnipayProps) => React.JSX.Element;
|
|
14
15
|
export {};
|
|
15
16
|
//# sourceMappingURL=Registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Registration.d.ts","sourceRoot":"","sources":["../../../../src/components/views/Registration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAW1D,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,KAAK,GAAG,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,wBAAwB,CAAC,EAAE,CAAC,EAC1B,WAAW,EACX,QAAQ,GACT,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAQF,eAAO,MAAM,YAAY,GAAI,4EAO1B,YAAY,KAAG,KAAK,CAAC,GAAG,CAAC,OA2F3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/functions.ts"],"names":[],"mappings":"AAGA,wBAAsB,oBAAoB,qBAoBzC;AAED,wBAAsB,UAAU;;;GAe/B;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,oEAK7C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare function useOmnipay(): {
|
|
2
|
+
initiateBills: ({ phoneNumber, onClose }: {
|
|
3
|
+
phoneNumber: string;
|
|
4
|
+
onClose?: () => void;
|
|
5
|
+
}) => void;
|
|
6
|
+
initiateWallet: ({ phoneNumber, customerRef, userRef, onClose, usesPaylater, usesPromo, usesAirtimeData, usesTransfer, usesBills, usesPos, promoBalanceOffset, deviceId, deviceName, hideWalletTransfer, isBvnValidationRequired, walletTab, sessionId, launchPage, kycStatus, }: {
|
|
7
|
+
phoneNumber?: string;
|
|
8
|
+
customerRef?: string;
|
|
9
|
+
userRef?: string;
|
|
10
|
+
usesPaylater?: boolean;
|
|
11
|
+
usesPromo?: boolean;
|
|
12
|
+
usesAirtimeData?: boolean;
|
|
13
|
+
usesTransfer?: boolean;
|
|
14
|
+
usesBills?: boolean;
|
|
15
|
+
usesPos?: boolean;
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
promoBalanceOffset?: number;
|
|
18
|
+
deviceId?: string;
|
|
19
|
+
deviceName?: string;
|
|
20
|
+
hideWalletTransfer?: boolean;
|
|
21
|
+
isBvnValidationRequired?: boolean;
|
|
22
|
+
walletTab?: "Paylater" | "Account" | "Omoni";
|
|
23
|
+
sessionId?: string;
|
|
24
|
+
kycStatus?: "verified" | "unverified";
|
|
25
|
+
launchPage?: string;
|
|
26
|
+
}) => void;
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=useOmnipay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOmnipay.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOmnipay.tsx"],"names":[],"mappings":"AAMA,wBAAgB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;EAQzB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Omnipay from './components/OmnipayView';
|
|
2
|
+
export { OmnipayProvider } from './components/OmnipayProvider';
|
|
3
|
+
export { useOmnipay } from './hooks/useOmnipay';
|
|
4
|
+
export { FaceVerification, LivenessDetection } from './components/biometrics';
|
|
5
|
+
export * from './components/biometrics/types';
|
|
6
|
+
export default Omnipay;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG9E,cAAc,+BAA+B,CAAC;AAE9C,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/lib/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/lib/config.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require "json"
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
4
5
|
|
|
5
6
|
Pod::Spec.new do |s|
|
|
6
7
|
s.name = "omnipay-reactnative-sdk"
|
|
@@ -10,38 +11,40 @@ Pod::Spec.new do |s|
|
|
|
10
11
|
s.license = package["license"]
|
|
11
12
|
s.authors = package["author"]
|
|
12
13
|
|
|
13
|
-
s.platforms = { :ios => "
|
|
14
|
-
s.source = { :git => "https://github.com/
|
|
14
|
+
s.platforms = { :ios => "12.4" }
|
|
15
|
+
s.source = { :git => "https://github.com/omniretail/omnipay-reactnative-sdk.git", :tag => "#{s.version}" }
|
|
15
16
|
|
|
16
|
-
# Source files
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"AVFoundation",
|
|
22
|
-
"Vision",
|
|
23
|
-
"CoreMedia",
|
|
24
|
-
"CoreVideo",
|
|
25
|
-
"ImageIO",
|
|
26
|
-
"UIKit",
|
|
27
|
-
"Foundation"
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
# React Native dependencies
|
|
18
|
+
s.requires_arc = true
|
|
19
|
+
|
|
20
|
+
# Dependencies
|
|
31
21
|
s.dependency "React-Core"
|
|
32
22
|
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
# React Native specific configuration
|
|
24
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
25
|
+
install_modules_dependencies(s)
|
|
26
|
+
else
|
|
27
|
+
s.dependency "React-Core"
|
|
28
|
+
|
|
29
|
+
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
30
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
31
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
32
|
+
s.pod_target_xcconfig = {
|
|
33
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
34
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
35
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
36
|
+
}
|
|
37
|
+
s.dependency "React-Codegen"
|
|
38
|
+
s.dependency "RCT-Folly"
|
|
39
|
+
s.dependency "RCTRequired"
|
|
40
|
+
s.dependency "RCTTypeSafety"
|
|
41
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# iOS specific frameworks for liveness detection
|
|
46
|
+
s.frameworks = 'Vision', 'AVFoundation', 'CoreMedia', 'CoreVideo', 'UIKit'
|
|
46
47
|
|
|
48
|
+
# iOS deployment target
|
|
49
|
+
s.ios.deployment_target = '12.4'
|
|
47
50
|
end
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnipay-reactnative-sdk",
|
|
3
|
-
"version": "1.2.2-beta.
|
|
3
|
+
"version": "1.2.2-beta.6",
|
|
4
4
|
"description": "Omnipay react native sdk",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -58,24 +58,28 @@
|
|
|
58
58
|
"@react-native-community/eslint-config": "^3.0.2",
|
|
59
59
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
60
60
|
"@types/jest": "^28.1.2",
|
|
61
|
-
"@types/react": "
|
|
62
|
-
"@types/react-
|
|
61
|
+
"@types/react": "^19.0.0",
|
|
62
|
+
"@types/react-dom": "^19.0.0",
|
|
63
63
|
"commitlint": "^17.0.2",
|
|
64
64
|
"eslint": "^8.4.1",
|
|
65
65
|
"eslint-config-prettier": "^8.5.0",
|
|
66
66
|
"eslint-plugin-prettier": "^4.0.0",
|
|
67
67
|
"jest": "^28.1.1",
|
|
68
|
+
"metro-minify-terser": "^0.81.3",
|
|
68
69
|
"pod-install": "^0.1.0",
|
|
69
70
|
"prettier": "^2.0.5",
|
|
70
|
-
"react": "
|
|
71
|
-
"react-
|
|
71
|
+
"react": "19.0.0",
|
|
72
|
+
"react-dom": "19.0.0",
|
|
73
|
+
"react-native": "0.78.2",
|
|
72
74
|
"react-native-builder-bob": "^0.20.0",
|
|
73
|
-
"react-native-share": "^
|
|
75
|
+
"react-native-share": "^12.1.1",
|
|
74
76
|
"release-it": "^15.0.0",
|
|
75
|
-
"
|
|
77
|
+
"turbo": "^1.10.7",
|
|
78
|
+
"typescript": "^5.0.2"
|
|
76
79
|
},
|
|
77
80
|
"resolutions": {
|
|
78
|
-
"@types/react": "
|
|
81
|
+
"@types/react": "^19.0.0",
|
|
82
|
+
"@types/react-dom": "^19.0.0"
|
|
79
83
|
},
|
|
80
84
|
"peerDependencies": {
|
|
81
85
|
"react": "*",
|
|
@@ -118,6 +122,7 @@
|
|
|
118
122
|
"prettier"
|
|
119
123
|
],
|
|
120
124
|
"rules": {
|
|
125
|
+
"react/react-in-jsx-scope": "off",
|
|
121
126
|
"prettier/prettier": [
|
|
122
127
|
"error",
|
|
123
128
|
{
|
|
@@ -156,9 +161,9 @@
|
|
|
156
161
|
]
|
|
157
162
|
},
|
|
158
163
|
"dependencies": {
|
|
159
|
-
"@react-native-async-storage/async-storage": "^
|
|
164
|
+
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
160
165
|
"react-native-select-contact": "^1.6.3",
|
|
161
|
-
"react-native-webview": "^
|
|
166
|
+
"react-native-webview": "^13.15.0"
|
|
162
167
|
},
|
|
163
168
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
164
169
|
}
|
|
@@ -12,17 +12,12 @@ import {
|
|
|
12
12
|
Image,
|
|
13
13
|
TouchableWithoutFeedback,
|
|
14
14
|
Text,
|
|
15
|
-
NativeModules,
|
|
16
|
-
NativeEventEmitter,
|
|
17
15
|
} from 'react-native';
|
|
18
16
|
import WebView, { WebViewMessageEvent } from 'react-native-webview';
|
|
19
17
|
import { getContact } from '../functions';
|
|
20
18
|
import Share from 'react-native-share';
|
|
21
|
-
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
22
19
|
import FaceVerification from './biometrics/FaceVerification';
|
|
23
20
|
|
|
24
|
-
const OmnipayActivity = NativeModules.OmnipayActivity || {};
|
|
25
|
-
|
|
26
21
|
type OmnipayProviderProps = {
|
|
27
22
|
publicKey: string;
|
|
28
23
|
env: 'dev' | 'prod';
|
|
@@ -30,16 +25,6 @@ type OmnipayProviderProps = {
|
|
|
30
25
|
children: React.ReactElement | React.ReactElement[];
|
|
31
26
|
};
|
|
32
27
|
|
|
33
|
-
type PosTransactionType = {
|
|
34
|
-
amount: number;
|
|
35
|
-
purchaseType: 'PURCHASE' | 'KEY EXCHANGE';
|
|
36
|
-
color: string;
|
|
37
|
-
print: boolean;
|
|
38
|
-
rrn: string;
|
|
39
|
-
stan: string;
|
|
40
|
-
terminalId: string;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
28
|
type PostMessage = {
|
|
44
29
|
[key: string]: unknown;
|
|
45
30
|
};
|
|
@@ -112,7 +97,7 @@ export const OmnipayProvider = ({
|
|
|
112
97
|
publicKey,
|
|
113
98
|
env,
|
|
114
99
|
color,
|
|
115
|
-
}: OmnipayProviderProps)
|
|
100
|
+
}: OmnipayProviderProps) => {
|
|
116
101
|
const [webviewStatus, setWebviewStatus] = useState<Status>('loading');
|
|
117
102
|
const [isVisible, setIsVisible] = useState(false);
|
|
118
103
|
const webviewRef = useRef<WebView>(null);
|
|
@@ -124,103 +109,18 @@ export const OmnipayProvider = ({
|
|
|
124
109
|
const isValidEnv = ['prod', 'dev'].includes(env);
|
|
125
110
|
const isValidColor = color.length > 2;
|
|
126
111
|
const onCloseRef = useRef<(() => void) | undefined>(undefined);
|
|
127
|
-
const [canUsePos, setCanUsePos] = useState(false);
|
|
128
112
|
const [showFaceVerification, setShowFaceVerification] = useState(false);
|
|
129
113
|
|
|
130
114
|
useEffect(() => {
|
|
131
|
-
checkPaymentApp();
|
|
132
115
|
setTimeout(() => {
|
|
133
116
|
setShowFaceVerification(true);
|
|
134
|
-
},
|
|
117
|
+
}, 4000);
|
|
135
118
|
}, []);
|
|
136
119
|
|
|
137
120
|
useEffect(() => {
|
|
138
121
|
visibilityRef.current = isVisible;
|
|
139
122
|
}, [isVisible]);
|
|
140
123
|
|
|
141
|
-
useEffect(() => {
|
|
142
|
-
if (canUsePos) {
|
|
143
|
-
const eventEmitter = new NativeEventEmitter(OmnipayActivity);
|
|
144
|
-
eventEmitter.addListener('OmnipayEvent', (event) => {
|
|
145
|
-
console.log('native event', event);
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
}, [canUsePos]);
|
|
149
|
-
|
|
150
|
-
async function checkPaymentApp() {
|
|
151
|
-
try {
|
|
152
|
-
if (Platform.OS === 'android') {
|
|
153
|
-
const isInstalled = await OmnipayActivity.isPackageInstalled(
|
|
154
|
-
'com.horizonpay.sample'
|
|
155
|
-
);
|
|
156
|
-
if (isInstalled) {
|
|
157
|
-
setCanUsePos(true);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
} catch (error) {}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
async function startPosTransaction({
|
|
164
|
-
amount,
|
|
165
|
-
purchaseType,
|
|
166
|
-
print,
|
|
167
|
-
rrn,
|
|
168
|
-
stan,
|
|
169
|
-
terminalId,
|
|
170
|
-
}: PosTransactionType) {
|
|
171
|
-
try {
|
|
172
|
-
if (Platform.OS === 'android') {
|
|
173
|
-
let result = '';
|
|
174
|
-
|
|
175
|
-
if (purchaseType === 'KEY EXCHANGE') {
|
|
176
|
-
const isKeyExchanged = await AsyncStorage.getItem('isKeyExchanged');
|
|
177
|
-
if (!isKeyExchanged) {
|
|
178
|
-
result = await OmnipayActivity.initiateHorizonTransaction(
|
|
179
|
-
amount,
|
|
180
|
-
purchaseType,
|
|
181
|
-
color,
|
|
182
|
-
print,
|
|
183
|
-
rrn,
|
|
184
|
-
stan,
|
|
185
|
-
terminalId
|
|
186
|
-
);
|
|
187
|
-
if (
|
|
188
|
-
terminalId &&
|
|
189
|
-
result &&
|
|
190
|
-
result.toLowerCase().includes('-message-success')
|
|
191
|
-
) {
|
|
192
|
-
await AsyncStorage.setItem('isKeyExchanged', terminalId);
|
|
193
|
-
}
|
|
194
|
-
postMessage({
|
|
195
|
-
dataKey: 'onPosKeyExchanged',
|
|
196
|
-
dataValue: result,
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
} else {
|
|
200
|
-
result = await OmnipayActivity.initiateHorizonTransaction(
|
|
201
|
-
amount,
|
|
202
|
-
purchaseType,
|
|
203
|
-
color,
|
|
204
|
-
print,
|
|
205
|
-
rrn,
|
|
206
|
-
stan,
|
|
207
|
-
terminalId
|
|
208
|
-
);
|
|
209
|
-
postMessage({
|
|
210
|
-
dataKey: 'onPosTransactionSuccess',
|
|
211
|
-
dataValue: result,
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
} catch (error) {
|
|
216
|
-
console.log(error);
|
|
217
|
-
postMessage({
|
|
218
|
-
dataKey: 'onPosTransactionFailure',
|
|
219
|
-
dataValue: '',
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
124
|
function getWebviewStyle() {
|
|
225
125
|
if (!showWebview) {
|
|
226
126
|
return { opacity: 0, height: 0, width: 0, flex: 0 };
|
|
@@ -280,9 +180,6 @@ export const OmnipayProvider = ({
|
|
|
280
180
|
if (dataKey === 'shareReceipt') {
|
|
281
181
|
shareReceipt(dataValue);
|
|
282
182
|
}
|
|
283
|
-
if (dataKey === 'startPosTransaction') {
|
|
284
|
-
startPosTransaction(JSON.parse(dataValue));
|
|
285
|
-
}
|
|
286
183
|
}
|
|
287
184
|
} catch (error) {}
|
|
288
185
|
}
|
|
@@ -341,7 +238,7 @@ export const OmnipayProvider = ({
|
|
|
341
238
|
const usesNativeShare = true;
|
|
342
239
|
|
|
343
240
|
if (isPhoneNumberValid || isValidCustomerRef || isValidUserRef) {
|
|
344
|
-
const webUrl = `${webHost}?theme=${color}&view=wallet&publicKey=${publicKey}&phoneNumber=${phoneNumber}&usesPaylater=${usesPaylater}&usesPromo=${usesPromo}&usesAirtimeData=${usesAirtimeData}&usesTransfer=${usesTransfer}&usesBills=${usesBills}&usesPos=${usesPos}&customerRef=${customerRef}&userRef=${userRef}&promoBalanceOffset=${promoBalanceOffset}&deviceId=${deviceId}&deviceName=${deviceName}&hideWalletTransfer=${hideWalletTransfer}&bvnRequired=${isBvnValidationRequired}&usesNativeShare=${usesNativeShare}&
|
|
241
|
+
const webUrl = `${webHost}?theme=${color}&view=wallet&publicKey=${publicKey}&phoneNumber=${phoneNumber}&usesPaylater=${usesPaylater}&usesPromo=${usesPromo}&usesAirtimeData=${usesAirtimeData}&usesTransfer=${usesTransfer}&usesBills=${usesBills}&usesPos=${usesPos}&customerRef=${customerRef}&userRef=${userRef}&promoBalanceOffset=${promoBalanceOffset}&deviceId=${deviceId}&deviceName=${deviceName}&hideWalletTransfer=${hideWalletTransfer}&bvnRequired=${isBvnValidationRequired}&usesNativeShare=${usesNativeShare}&walletTab=${walletTab}&sessionId=${sessionId}&kycStatus=${
|
|
345
242
|
kycStatus || ''
|
|
346
243
|
}&launchPage=${launchPage}`;
|
|
347
244
|
setWebviewUrl(webUrl);
|
|
@@ -38,7 +38,7 @@ const Omnipay = ({
|
|
|
38
38
|
view,
|
|
39
39
|
onEnterFullScreen,
|
|
40
40
|
onExitFullScreen,
|
|
41
|
-
}: OmnipayProps): JSX.Element => {
|
|
41
|
+
}: OmnipayProps): React.JSX.Element => {
|
|
42
42
|
const webviewRef = useRef<WebView>(null);
|
|
43
43
|
const [webviewStatus, setWebviewStatus] = useState<Status>('loading');
|
|
44
44
|
const webHost = getWebHost();
|