@tonder.io/rn-sdk 0.1.0-beta.DEV1355.1 → 0.1.0-beta.DEV1355.3
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 +1302 -13
- package/lib/commonjs/core/3DSHandler.js +5 -3
- package/lib/commonjs/core/3DSHandler.js.map +1 -1
- package/lib/commonjs/core/BaseCheckout/index.js +6 -3
- package/lib/commonjs/core/BaseCheckout/index.js.map +1 -1
- package/lib/commonjs/core/PaymentInlineContainer/index.js +1 -1
- package/lib/commonjs/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/commonjs/core/PaymentLiteContainer/index.js +1 -1
- package/lib/commonjs/core/PaymentLiteContainer/index.js.map +1 -1
- package/lib/commonjs/core/Tonder/index.js +1 -3
- package/lib/commonjs/core/Tonder/index.js.map +1 -1
- package/lib/commonjs/services/CardService.js +5 -4
- package/lib/commonjs/services/CardService.js.map +1 -1
- package/lib/commonjs/types/base.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardCVVInput.js +2 -1
- package/lib/commonjs/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js +2 -1
- package/lib/commonjs/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js +2 -1
- package/lib/commonjs/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardHolderInput.js +2 -1
- package/lib/commonjs/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/commonjs/ui/components/Input/CardNumberInput.js +2 -1
- package/lib/commonjs/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js +2 -1
- package/lib/commonjs/ui/providers/TonderProvider/uiWrapper.js.map +1 -1
- package/lib/module/core/3DSHandler.js +5 -3
- package/lib/module/core/3DSHandler.js.map +1 -1
- package/lib/module/core/BaseCheckout/index.js +7 -4
- package/lib/module/core/BaseCheckout/index.js.map +1 -1
- package/lib/module/core/PaymentInlineContainer/index.js +1 -1
- package/lib/module/core/PaymentInlineContainer/index.js.map +1 -1
- package/lib/module/core/PaymentLiteContainer/index.js +1 -1
- package/lib/module/core/PaymentLiteContainer/index.js.map +1 -1
- package/lib/module/core/Tonder/index.js +1 -3
- package/lib/module/core/Tonder/index.js.map +1 -1
- package/lib/module/services/CardService.js +5 -4
- package/lib/module/services/CardService.js.map +1 -1
- package/lib/module/types/base.js.map +1 -1
- package/lib/module/ui/components/Input/CardCVVInput.js +2 -1
- package/lib/module/ui/components/Input/CardCVVInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js +2 -1
- package/lib/module/ui/components/Input/CardExpirationMonthInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardExpirationYearInput.js +2 -1
- package/lib/module/ui/components/Input/CardExpirationYearInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardHolderInput.js +2 -1
- package/lib/module/ui/components/Input/CardHolderInput.js.map +1 -1
- package/lib/module/ui/components/Input/CardNumberInput.js +2 -1
- package/lib/module/ui/components/Input/CardNumberInput.js.map +1 -1
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js +2 -1
- package/lib/module/ui/providers/TonderProvider/uiWrapper.js.map +1 -1
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts +1 -1
- package/lib/typescript/commonjs/src/core/3DSHandler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts +3 -2
- package/lib/typescript/commonjs/src/core/BaseCheckout/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/core/Tonder/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/services/CardService.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/base.d.ts +0 -1
- package/lib/typescript/commonjs/src/types/base.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts +2 -3
- package/lib/typescript/commonjs/src/types/baseCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts +1 -2
- package/lib/typescript/commonjs/src/types/inlineCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts +0 -1
- package/lib/typescript/commonjs/src/types/liteCheckout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/threeDSHandler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/core/3DSHandler.d.ts +1 -1
- package/lib/typescript/module/src/core/3DSHandler.d.ts.map +1 -1
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts +3 -2
- package/lib/typescript/module/src/core/BaseCheckout/index.d.ts.map +1 -1
- package/lib/typescript/module/src/core/Tonder/index.d.ts.map +1 -1
- package/lib/typescript/module/src/services/CardService.d.ts.map +1 -1
- package/lib/typescript/module/src/types/base.d.ts +0 -1
- package/lib/typescript/module/src/types/base.d.ts.map +1 -1
- package/lib/typescript/module/src/types/baseCheckout.d.ts +2 -3
- package/lib/typescript/module/src/types/baseCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/inlineCheckout.d.ts +1 -2
- package/lib/typescript/module/src/types/inlineCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/liteCheckout.d.ts +0 -1
- package/lib/typescript/module/src/types/liteCheckout.d.ts.map +1 -1
- package/lib/typescript/module/src/types/threeDSHandler.d.ts +1 -1
- package/lib/typescript/module/src/types/threeDSHandler.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardCVVInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationMonthInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardExpirationYearInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardHolderInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/Input/CardNumberInput.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/providers/TonderProvider/uiWrapper.d.ts.map +1 -1
- package/package.json +1 -4
- package/src/core/3DSHandler.ts +8 -2
- package/src/core/BaseCheckout/index.ts +39 -25
- package/src/core/PaymentInlineContainer/index.ts +1 -1
- package/src/core/PaymentLiteContainer/index.ts +1 -1
- package/src/core/Tonder/index.ts +0 -4
- package/src/services/CardService.ts +5 -4
- package/src/types/base.ts +0 -1
- package/src/types/baseCheckout.ts +2 -1
- package/src/types/inlineCheckout.ts +1 -2
- package/src/types/liteCheckout.ts +0 -1
- package/src/types/threeDSHandler.ts +1 -0
- package/src/ui/components/Input/CardCVVInput.tsx +2 -1
- package/src/ui/components/Input/CardExpirationMonthInput.tsx +2 -1
- package/src/ui/components/Input/CardExpirationYearInput.tsx +2 -1
- package/src/ui/components/Input/CardHolderInput.tsx +2 -1
- package/src/ui/components/Input/CardNumberInput.tsx +2 -1
- package/src/ui/providers/TonderProvider/uiWrapper.ts +8 -1
- package/lib/commonjs/hooks/useTonder/index-old.js +0 -37
- package/lib/commonjs/hooks/useTonder/index-old.js.map +0 -1
- package/lib/module/hooks/useTonder/index-old.js +0 -37
- package/lib/module/hooks/useTonder/index-old.js.map +0 -1
- package/lib/typescript/commonjs/src/hooks/useTonder/index-old.d.ts +0 -1
- package/lib/typescript/commonjs/src/hooks/useTonder/index-old.d.ts.map +0 -1
- package/lib/typescript/module/src/hooks/useTonder/index-old.d.ts +0 -1
- package/lib/typescript/module/src/hooks/useTonder/index-old.d.ts.map +0 -1
- package/src/hooks/useTonder/index-old.ts +0 -35
|
@@ -16,7 +16,6 @@ import { SDKType } from '@tonder.io/rn-sdk';
|
|
|
16
16
|
import TonderError from '@shared/utils/errors';
|
|
17
17
|
|
|
18
18
|
export interface IInlineCheckoutOptions extends IBaseCreateOptions {
|
|
19
|
-
tdsIframeId?: string;
|
|
20
19
|
paymentData: IBaseProcessPaymentRequest;
|
|
21
20
|
customization?: IInlineCustomizationOptions;
|
|
22
21
|
callbacks?: IInlineCallbacks;
|
|
@@ -56,7 +55,7 @@ export interface IInlineCustomizationOptions {
|
|
|
56
55
|
}
|
|
57
56
|
export interface IInlineCallbacks extends IBaseCallback {
|
|
58
57
|
beforeDeleteCard?: () => Promise<void>;
|
|
59
|
-
onFinishDeleteCard?: (
|
|
58
|
+
onFinishDeleteCard?: (response: IBaseResponse<string>) => Promise<void>;
|
|
60
59
|
}
|
|
61
60
|
export interface IPaymentInlineContainer {
|
|
62
61
|
/**
|
|
@@ -16,7 +16,6 @@ import TonderError from '@shared/utils/errors';
|
|
|
16
16
|
|
|
17
17
|
export interface ILiteCheckoutOptions extends IBaseCreateOptions {
|
|
18
18
|
paymentData: IProcessPaymentRequest;
|
|
19
|
-
tdsIframeId?: string;
|
|
20
19
|
customization?: ILiteCustomizationOptions;
|
|
21
20
|
callbacks?: ILiteCallbacks;
|
|
22
21
|
returnURL?: string;
|
|
@@ -30,9 +30,10 @@ export const CardCVVInput: React.FC<InputProps> = ({
|
|
|
30
30
|
{state?.skyflowContainer && state?.isCreated && !state?.isCreating && (
|
|
31
31
|
<View
|
|
32
32
|
style={{
|
|
33
|
+
...DEFAULT_INPUT_CONTAINER_STYLES.base,
|
|
33
34
|
...(style?.inputStyles?.container
|
|
34
35
|
? { ...style.inputStyles.container }
|
|
35
|
-
:
|
|
36
|
+
: {}),
|
|
36
37
|
}}
|
|
37
38
|
>
|
|
38
39
|
<CvvElement
|
|
@@ -29,9 +29,10 @@ export const CardExpirationMonthInput: React.FC<InputProps> = ({
|
|
|
29
29
|
{state?.skyflowContainer && state?.isCreated && !state?.isCreating && (
|
|
30
30
|
<View
|
|
31
31
|
style={{
|
|
32
|
+
...DEFAULT_INPUT_CONTAINER_STYLES.base,
|
|
32
33
|
...(style?.inputStyles?.container
|
|
33
34
|
? { ...style.inputStyles.container }
|
|
34
|
-
:
|
|
35
|
+
: {}),
|
|
35
36
|
}}
|
|
36
37
|
>
|
|
37
38
|
<ExpirationMonthElement
|
|
@@ -30,9 +30,10 @@ export const CardExpirationYearInput: React.FC<InputProps> = ({
|
|
|
30
30
|
{state?.skyflowContainer && state?.isCreated && !state?.isCreating && (
|
|
31
31
|
<View
|
|
32
32
|
style={{
|
|
33
|
+
...DEFAULT_INPUT_CONTAINER_STYLES.base,
|
|
33
34
|
...(style?.inputStyles?.container
|
|
34
35
|
? { ...style.inputStyles.container }
|
|
35
|
-
:
|
|
36
|
+
: {}),
|
|
36
37
|
}}
|
|
37
38
|
>
|
|
38
39
|
<ExpirationYearElement
|
|
@@ -31,9 +31,10 @@ export const CardHolderInput: React.FC<InputProps> = ({
|
|
|
31
31
|
{state?.skyflowContainer && state?.isCreated && !state?.isCreating && (
|
|
32
32
|
<View
|
|
33
33
|
style={{
|
|
34
|
+
...DEFAULT_INPUT_CONTAINER_STYLES.base,
|
|
34
35
|
...(style?.inputStyles?.container
|
|
35
36
|
? { ...style.inputStyles.container }
|
|
36
|
-
:
|
|
37
|
+
: {}),
|
|
37
38
|
}}
|
|
38
39
|
>
|
|
39
40
|
<CardHolderNameElement
|
|
@@ -30,9 +30,10 @@ export const CardNumberInput: React.FC<InputProps> = ({
|
|
|
30
30
|
{state?.skyflowContainer && state?.isCreated && !state?.isCreating && (
|
|
31
31
|
<View
|
|
32
32
|
style={{
|
|
33
|
+
...DEFAULT_INPUT_CONTAINER_STYLES.base,
|
|
33
34
|
...(style?.inputStyles?.container
|
|
34
35
|
? { ...style.inputStyles.container }
|
|
35
|
-
:
|
|
36
|
+
: {}),
|
|
36
37
|
}}
|
|
37
38
|
>
|
|
38
39
|
<CardNumberElement
|
|
@@ -31,7 +31,9 @@ const uiWrapper = (tonder: Tonder): IUIWrapper => ({
|
|
|
31
31
|
tonder.updateUIState({
|
|
32
32
|
cards: tonder
|
|
33
33
|
.getState()
|
|
34
|
-
.uiData.cards.filter(
|
|
34
|
+
.uiData.cards.filter(
|
|
35
|
+
(card: any) => card.fields.skyflow_id !== cardId
|
|
36
|
+
),
|
|
35
37
|
});
|
|
36
38
|
await executeCallback({
|
|
37
39
|
callbacks,
|
|
@@ -39,6 +41,11 @@ const uiWrapper = (tonder: Tonder): IUIWrapper => ({
|
|
|
39
41
|
data: { response: MESSAGES_EN.REMOVE_CARD },
|
|
40
42
|
});
|
|
41
43
|
} catch (error) {
|
|
44
|
+
console.log(
|
|
45
|
+
'[uiWrapper | removeCustomerCard | ERROR',
|
|
46
|
+
error,
|
|
47
|
+
error?.details
|
|
48
|
+
);
|
|
42
49
|
await executeCallback({
|
|
43
50
|
callbacks,
|
|
44
51
|
callback: 'onFinishDeleteCard',
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// import { useCallback, useContext } from 'react';
|
|
2
|
-
// import { TonderContext } from '@ui/providers/TonderProvider';
|
|
3
|
-
// import type { SDKMethodsInstance, SDKType } from '@types';
|
|
4
|
-
// import { TonderError } from '@shared/utils/errors';
|
|
5
|
-
// import { ServiceManager } from '@infrastructure/ServiceManager';
|
|
6
|
-
//
|
|
7
|
-
// export interface IUseTonder<T extends SDKType> {
|
|
8
|
-
// methods: SDKMethodsInstance<T>;
|
|
9
|
-
// error: TonderError | Error | null;
|
|
10
|
-
// isCreated: boolean;
|
|
11
|
-
// create: any;
|
|
12
|
-
// }
|
|
13
|
-
//
|
|
14
|
-
// export function useTonder<T extends SDKType>(): IUseTonder<T> {
|
|
15
|
-
// const context = useContext(TonderContext);
|
|
16
|
-
// const { sdk, config } = context;
|
|
17
|
-
//
|
|
18
|
-
// const service = new ServiceManager(config!);
|
|
19
|
-
//
|
|
20
|
-
// const methods = useCallback(() => {
|
|
21
|
-
// const allowedMethods = sdk?.getAllowedMethods() || {};
|
|
22
|
-
// return {
|
|
23
|
-
// ...allowedMethods,
|
|
24
|
-
// getSecureToken: (secretApiKey: string, signal?: AbortSignal) =>
|
|
25
|
-
// service.token.getSecureToken(secretApiKey, signal),
|
|
26
|
-
// };
|
|
27
|
-
// }, [sdk, service.token]);
|
|
28
|
-
//
|
|
29
|
-
// return {
|
|
30
|
-
// methods: methods(),
|
|
31
|
-
// error: context?.sdkState?.error || null,
|
|
32
|
-
// isCreated: context?.sdkState?.isCreated,
|
|
33
|
-
// isProcessing: context?.sdkState?.isProcessing,
|
|
34
|
-
// } as IUseTonder<T>;
|
|
35
|
-
// }
|
|
36
|
-
"use strict";
|
|
37
|
-
//# sourceMappingURL=index-old.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["hooks/useTonder/index-old.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
// import { useCallback, useContext } from 'react';
|
|
2
|
-
// import { TonderContext } from '@ui/providers/TonderProvider';
|
|
3
|
-
// import type { SDKMethodsInstance, SDKType } from '@types';
|
|
4
|
-
// import { TonderError } from '@shared/utils/errors';
|
|
5
|
-
// import { ServiceManager } from '@infrastructure/ServiceManager';
|
|
6
|
-
//
|
|
7
|
-
// export interface IUseTonder<T extends SDKType> {
|
|
8
|
-
// methods: SDKMethodsInstance<T>;
|
|
9
|
-
// error: TonderError | Error | null;
|
|
10
|
-
// isCreated: boolean;
|
|
11
|
-
// create: any;
|
|
12
|
-
// }
|
|
13
|
-
//
|
|
14
|
-
// export function useTonder<T extends SDKType>(): IUseTonder<T> {
|
|
15
|
-
// const context = useContext(TonderContext);
|
|
16
|
-
// const { sdk, config } = context;
|
|
17
|
-
//
|
|
18
|
-
// const service = new ServiceManager(config!);
|
|
19
|
-
//
|
|
20
|
-
// const methods = useCallback(() => {
|
|
21
|
-
// const allowedMethods = sdk?.getAllowedMethods() || {};
|
|
22
|
-
// return {
|
|
23
|
-
// ...allowedMethods,
|
|
24
|
-
// getSecureToken: (secretApiKey: string, signal?: AbortSignal) =>
|
|
25
|
-
// service.token.getSecureToken(secretApiKey, signal),
|
|
26
|
-
// };
|
|
27
|
-
// }, [sdk, service.token]);
|
|
28
|
-
//
|
|
29
|
-
// return {
|
|
30
|
-
// methods: methods(),
|
|
31
|
-
// error: context?.sdkState?.error || null,
|
|
32
|
-
// isCreated: context?.sdkState?.isCreated,
|
|
33
|
-
// isProcessing: context?.sdkState?.isProcessing,
|
|
34
|
-
// } as IUseTonder<T>;
|
|
35
|
-
// }
|
|
36
|
-
"use strict";
|
|
37
|
-
//# sourceMappingURL=index-old.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["hooks/useTonder/index-old.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index-old.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-old.d.ts","sourceRoot":"","sources":["../../../../../../src/hooks/useTonder/index-old.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index-old.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-old.d.ts","sourceRoot":"","sources":["../../../../../../src/hooks/useTonder/index-old.ts"],"names":[],"mappings":""}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// import { useCallback, useContext } from 'react';
|
|
2
|
-
// import { TonderContext } from '@ui/providers/TonderProvider';
|
|
3
|
-
// import type { SDKMethodsInstance, SDKType } from '@types';
|
|
4
|
-
// import { TonderError } from '@shared/utils/errors';
|
|
5
|
-
// import { ServiceManager } from '@infrastructure/ServiceManager';
|
|
6
|
-
//
|
|
7
|
-
// export interface IUseTonder<T extends SDKType> {
|
|
8
|
-
// methods: SDKMethodsInstance<T>;
|
|
9
|
-
// error: TonderError | Error | null;
|
|
10
|
-
// isCreated: boolean;
|
|
11
|
-
// create: any;
|
|
12
|
-
// }
|
|
13
|
-
//
|
|
14
|
-
// export function useTonder<T extends SDKType>(): IUseTonder<T> {
|
|
15
|
-
// const context = useContext(TonderContext);
|
|
16
|
-
// const { sdk, config } = context;
|
|
17
|
-
//
|
|
18
|
-
// const service = new ServiceManager(config!);
|
|
19
|
-
//
|
|
20
|
-
// const methods = useCallback(() => {
|
|
21
|
-
// const allowedMethods = sdk?.getAllowedMethods() || {};
|
|
22
|
-
// return {
|
|
23
|
-
// ...allowedMethods,
|
|
24
|
-
// getSecureToken: (secretApiKey: string, signal?: AbortSignal) =>
|
|
25
|
-
// service.token.getSecureToken(secretApiKey, signal),
|
|
26
|
-
// };
|
|
27
|
-
// }, [sdk, service.token]);
|
|
28
|
-
//
|
|
29
|
-
// return {
|
|
30
|
-
// methods: methods(),
|
|
31
|
-
// error: context?.sdkState?.error || null,
|
|
32
|
-
// isCreated: context?.sdkState?.isCreated,
|
|
33
|
-
// isProcessing: context?.sdkState?.isProcessing,
|
|
34
|
-
// } as IUseTonder<T>;
|
|
35
|
-
// }
|