react-nomba-checkout-sdk 1.0.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.
- package/babel.config.js +13 -0
- package/dist/apis/handleApiCall.d.ts +3 -0
- package/dist/apis/useCardCheckout.d.ts +8 -0
- package/dist/apis/useCardCheckoutOtp.d.ts +8 -0
- package/dist/apis/useFetchUssdBanks.d.ts +1 -0
- package/dist/apis/useGenerateQrCode.d.ts +1 -0
- package/dist/apis/useGetOrder.d.ts +1 -0
- package/dist/apis/useGetUssdCode.d.ts +15 -0
- package/dist/apis/useResendOtp.d.ts +1 -0
- package/dist/apis/useVerifyOrderStatus.d.ts +1 -0
- package/dist/assets/CloseIcon.d.ts +2 -0
- package/dist/assets/Loader.d.ts +3 -0
- package/dist/components/NombaCheckoutButton.d.ts +17 -0
- package/dist/components/NombaCheckoutModal.d.ts +16 -0
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.esm.css +2 -0
- package/dist/index.esm.css.map +1 -0
- package/dist/index.esm.js +4105 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +4116 -0
- package/dist/index.js.map +1 -0
- package/package.json +76 -0
- package/rollup.config.js +43 -0
- package/src/apis/handleApiCall.ts +20 -0
- package/src/apis/useCardCheckout.ts +35 -0
- package/src/apis/useCardCheckoutOtp.ts +21 -0
- package/src/apis/useFetchUssdBanks.ts +10 -0
- package/src/apis/useGenerateQrCode.ts +13 -0
- package/src/apis/useGetOrder.ts +13 -0
- package/src/apis/useGetUssdCode.ts +28 -0
- package/src/apis/useResendOtp.ts +12 -0
- package/src/apis/useVerifyOrderStatus.ts +14 -0
- package/src/assets/CloseIcon.tsx +19 -0
- package/src/assets/Loader.tsx +18 -0
- package/src/components/NombaCheckoutButton.tsx +67 -0
- package/src/components/NombaCheckoutModal.tsx +132 -0
- package/src/index.tsx +24 -0
- package/src/styles.css +14 -0
- package/tsconfig.json +80 -0
package/babel.config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFetchUssdBanks: () => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useGenerateQrCode: (orderReference: string) => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useGetOrder: (orderReference: string) => Promise<any>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface UssdCodeRequest {
|
|
2
|
+
ussdBankId: string;
|
|
3
|
+
bankName: string;
|
|
4
|
+
bankCode: string;
|
|
5
|
+
processor: string;
|
|
6
|
+
processorCodeName: string;
|
|
7
|
+
ussdCodeFormat: string;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
promptMessage: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const useGetUssdCode: (payload: {
|
|
12
|
+
ussdCode: UssdCodeRequest;
|
|
13
|
+
orderId: string;
|
|
14
|
+
}) => Promise<any>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useResendOtp: (orderReference: string) => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useVerifyOrderStatus: (orderReference: string) => Promise<any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
interface NombaCheckoutButtonProps {
|
|
3
|
+
orderId: string;
|
|
4
|
+
buttonText?: string;
|
|
5
|
+
buttonStyle?: React.CSSProperties;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}
|
|
9
|
+
interface NombaCheckoutButtonState {
|
|
10
|
+
showModal: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare class NombaCheckoutButton extends Component<NombaCheckoutButtonProps, NombaCheckoutButtonState> {
|
|
13
|
+
constructor(props: NombaCheckoutButtonProps);
|
|
14
|
+
handleClose: () => void;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export { NombaCheckoutButton };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import "../styles.css";
|
|
3
|
+
interface NombaCheckoutModalProps {
|
|
4
|
+
orderId: string;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
interface NombaCheckoutModalState {
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare class NombaCheckoutModal extends Component<NombaCheckoutModalProps, NombaCheckoutModalState> {
|
|
11
|
+
constructor(props: NombaCheckoutModalProps);
|
|
12
|
+
handleClose: () => void;
|
|
13
|
+
handleIframeLoad: () => void;
|
|
14
|
+
render(): React.JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
export { NombaCheckoutModal };
|
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["styles.css"],"names":[],"mappings":"AAAA,uBAME,+CAAkC,CAFlC,+BAAsB,CACtB,iBAAkB,CADlB,qBAAsB,CAFtB,WAAY,CADZ,UAMF,CAEA,8BACE,GACE,uBACF,CACF","file":"index.css","sourcesContent":[".spinner {\n width: 40px;\n height: 40px;\n border: 4px solid rgba(0, 0, 0, 0.1);\n border-top-color: #000;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NombaCheckoutButton } from "./components/NombaCheckoutButton";
|
|
2
|
+
import { NombaCheckoutModal } from "./components/NombaCheckoutModal";
|
|
3
|
+
import { useGetOrder } from "./apis/useGetOrder";
|
|
4
|
+
import { useCardCheckout } from "./apis/useCardCheckout";
|
|
5
|
+
import { useCardCheckoutOtp } from "./apis/useCardCheckoutOtp";
|
|
6
|
+
import { useGenerateQrCode } from "./apis/useGenerateQrCode";
|
|
7
|
+
import { useVerifyOrderStatus } from "./apis/useVerifyOrderStatus";
|
|
8
|
+
import { useResendOtp } from "./apis/useResendOtp";
|
|
9
|
+
import { useFetchUssdBanks } from "./apis/useFetchUssdBanks";
|
|
10
|
+
import { useGetUssdCode } from "./apis/useGetUssdCode";
|
|
11
|
+
export { NombaCheckoutButton, NombaCheckoutModal, useGetOrder, useCardCheckout, useCardCheckoutOtp, useResendOtp, useGenerateQrCode, useVerifyOrderStatus, useFetchUssdBanks, useGetUssdCode, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["styles.css"],"names":[],"mappings":"AAAA,uBAME,+CAAkC,CAFlC,+BAAsB,CACtB,iBAAkB,CADlB,qBAAsB,CAFtB,WAAY,CADZ,UAMF,CAEA,8BACE,GACE,uBACF,CACF","file":"index.esm.css","sourcesContent":[".spinner {\n width: 40px;\n height: 40px;\n border: 4px solid rgba(0, 0, 0, 0.1);\n border-top-color: #000;\n border-radius: 50%;\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n"]}
|