paygate-checkout-sdk 0.0.7 → 0.0.8
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/dist/App.d.ts +1 -2
- package/dist/assets/icons/AmexIcon.d.ts +1 -2
- package/dist/assets/icons/DefaultCardIcon.d.ts +1 -2
- package/dist/assets/icons/DiscoverIcon.d.ts +1 -2
- package/dist/assets/icons/FaArrowLeftIcon.d.ts +1 -2
- package/dist/assets/icons/FaBankCardIcon.d.ts +1 -2
- package/dist/assets/icons/FaBankTransferIcon.d.ts +1 -2
- package/dist/assets/icons/FaChevronDownIcon.d.ts +1 -2
- package/dist/assets/icons/FaCopyIcon.d.ts +1 -2
- package/dist/assets/icons/FaInfoIcon.d.ts +1 -2
- package/dist/assets/icons/FaLockIcon.d.ts +1 -2
- package/dist/assets/icons/FaMobileIcon.d.ts +1 -2
- package/dist/assets/icons/FaNQRIcon.d.ts +1 -2
- package/dist/assets/icons/FaPaygateIcon.d.ts +1 -2
- package/dist/assets/icons/FaQRCodeIcon.d.ts +1 -2
- package/dist/assets/icons/FaSuccessicon.d.ts +1 -2
- package/dist/assets/icons/FaTimerIcon.d.ts +1 -2
- package/dist/assets/icons/FaUssdIcon.d.ts +1 -2
- package/dist/assets/icons/MasterCardIcon.d.ts +1 -2
- package/dist/assets/icons/VerveIcon.d.ts +1 -2
- package/dist/assets/icons/VisaIcon.d.ts +1 -2
- package/dist/components/Button/StatusBadge.d.ts +1 -2
- package/dist/components/Button/Styles.d.ts +6 -2
- package/dist/components/Text/Styles.d.ts +3 -1
- package/dist/components/card/BankCard.d.ts +1 -2
- package/dist/components/checkout/MobileMoneyPayment.d.ts +1 -2
- package/dist/components/checkout/PaymentFailedView.d.ts +4 -4
- package/dist/components/checkout/PaymentSuccessView.d.ts +5 -4
- package/dist/containers/Payment/PaygateCheckoutSdk.d.ts +10 -7
- package/dist/containers/Payment/index.d.ts +1 -2
- package/dist/index.d.ts +5 -11
- package/dist/index.iife.js +131 -110
- package/dist/index.iife.js.map +1 -1
- package/dist/lib/index.d.ts +1 -7
- package/dist/shared/hooks/useSnackBar.d.ts +1 -2
- package/dist/shared/themes/ThemeProvider.d.ts +1 -1
- package/dist/shared/types/index.d.ts +20 -11
- package/package.json +5 -3
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { MerchantDataProps, PaygateCheckoutSdkProps } from '../shared/types';
|
|
2
2
|
export type { MerchantDataProps, PaygateCheckoutSdkProps };
|
|
3
|
-
declare const sdk: {
|
|
4
|
-
setup: (config: {
|
|
5
|
-
targetId: string;
|
|
6
|
-
props: PaygateCheckoutSdkProps;
|
|
7
|
-
}) => void;
|
|
8
|
-
};
|
|
9
3
|
export declare const PaygateSdk: {
|
|
10
4
|
setup: (config: {
|
|
11
5
|
targetId: string;
|
|
@@ -15,7 +9,7 @@ export declare const PaygateSdk: {
|
|
|
15
9
|
declare global {
|
|
16
10
|
interface Window {
|
|
17
11
|
PaygateCheckoutSDK?: {
|
|
18
|
-
PaygateSdk: typeof
|
|
12
|
+
PaygateSdk: typeof PaygateSdk;
|
|
19
13
|
};
|
|
20
14
|
}
|
|
21
15
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
type SnackbarType = "success" | "error" | "info" | "warning";
|
|
3
2
|
export declare const useSnackbar: () => {
|
|
4
3
|
showSnackbar: (type: SnackbarType, title: string, message: string) => void;
|
|
5
|
-
SnackbarUI: () => import("react").JSX.Element;
|
|
4
|
+
SnackbarUI: () => import("react/jsx-runtime").JSX.Element;
|
|
6
5
|
};
|
|
7
6
|
export {};
|
|
@@ -2,5 +2,5 @@ import { ReactNode } from "react";
|
|
|
2
2
|
interface ThemeProviderProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
}
|
|
5
|
-
export declare function ThemeProvider({ children }: ThemeProviderProps): import("react").JSX.Element;
|
|
5
|
+
export declare function ThemeProvider({ children }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -42,16 +42,25 @@ export type ItemsType = {
|
|
|
42
42
|
price?: number;
|
|
43
43
|
};
|
|
44
44
|
export type VirtualAccountData = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
accountCreatedReference: string;
|
|
46
|
+
partnerRef: string;
|
|
47
|
+
channel: string;
|
|
48
|
+
bankName: string;
|
|
49
|
+
bankCode: string;
|
|
50
|
+
accountName: string;
|
|
51
|
+
accountNumber: string;
|
|
52
|
+
accountStatus: string;
|
|
53
|
+
accountType: string;
|
|
54
|
+
expiry: number;
|
|
55
|
+
amount: number;
|
|
56
|
+
fee: number;
|
|
57
|
+
amountExpected: number;
|
|
58
|
+
dateCreated: string;
|
|
59
|
+
dateExpired: string;
|
|
51
60
|
};
|
|
52
61
|
export type VirtualAccountResponse = {
|
|
53
62
|
message: string;
|
|
54
|
-
|
|
63
|
+
responseData: VirtualAccountData;
|
|
55
64
|
success: boolean;
|
|
56
65
|
};
|
|
57
66
|
export type Business = {
|
|
@@ -173,6 +182,7 @@ export type MerchantDataProps = {
|
|
|
173
182
|
countryCode: string;
|
|
174
183
|
currencyCode: string;
|
|
175
184
|
transactionCurrency?: string;
|
|
185
|
+
transactionRef: string;
|
|
176
186
|
merchantName?: string;
|
|
177
187
|
amount: number;
|
|
178
188
|
merchantReference?: string;
|
|
@@ -188,9 +198,8 @@ export type MerchantDataProps = {
|
|
|
188
198
|
metadataProductInfo?: string;
|
|
189
199
|
redirectUrl?: string;
|
|
190
200
|
merchantPublicKey?: string;
|
|
191
|
-
merchantSecretKey?: string;
|
|
192
201
|
merchantAPIKey?: string;
|
|
193
|
-
|
|
202
|
+
mode: string;
|
|
194
203
|
};
|
|
195
204
|
export type PaygateCheckoutSdkProps = {
|
|
196
205
|
userData: MerchantDataProps;
|
|
@@ -199,6 +208,6 @@ export type PaygateCheckoutSdkProps = {
|
|
|
199
208
|
environment?: "test" | "live";
|
|
200
209
|
[key: string]: any;
|
|
201
210
|
};
|
|
202
|
-
onSuccess?: (
|
|
203
|
-
onError?: (
|
|
211
|
+
onSuccess?: () => void;
|
|
212
|
+
onError?: () => void;
|
|
204
213
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paygate-checkout-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"main": "dist/index.jsx",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.esm.jsx",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@testing-library/user-event": "^13.2.1",
|
|
31
31
|
"@types/jest": "^27.0.1",
|
|
32
32
|
"@types/node": "^16.7.13",
|
|
33
|
-
"@types/react": "
|
|
34
|
-
"@types/react-dom": "
|
|
33
|
+
"@types/react": "18",
|
|
34
|
+
"@types/react-dom": "18",
|
|
35
35
|
"@types/styled-system": "^5.1.23",
|
|
36
36
|
"@vitejs/plugin-react": "^4.4.1",
|
|
37
37
|
"axios": "^1.9.0",
|
|
@@ -98,6 +98,8 @@
|
|
|
98
98
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
99
99
|
"@svgr/rollup": "^8.1.0",
|
|
100
100
|
"@types/styled-components": "^5.1.34",
|
|
101
|
+
"react": "18",
|
|
102
|
+
"react-dom": "18",
|
|
101
103
|
"rollup": "^4.44.2",
|
|
102
104
|
"rollup-plugin-dts": "^6.2.1",
|
|
103
105
|
"rollup-plugin-node-polyfills": "^0.2.1",
|