@tonder.io/ionic-full-sdk 0.0.35-beta → 0.0.36-beta.1
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 +0 -4
- package/dist/classes/3dsHandler.d.ts +1 -6
- package/dist/classes/inlineCheckout.d.ts +4 -4
- package/dist/helpers/constants.d.ts +62 -0
- package/dist/helpers/skyflow.d.ts +1 -1
- package/dist/helpers/template.d.ts +1 -1
- package/dist/helpers/utils.d.ts +4 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/classes/3dsHandler.ts +1 -18
- package/src/classes/inlineCheckout.ts +25 -18
- package/src/helpers/constants.ts +64 -0
- package/src/helpers/template.ts +26 -21
- package/src/helpers/utils.ts +251 -0
- package/src/index-dev.js +0 -2
package/README.md
CHANGED
|
@@ -63,12 +63,10 @@ const checkoutData = {
|
|
|
63
63
|
|
|
64
64
|
const apiKey = "You can take this from you Tonder Dashboard";
|
|
65
65
|
const returnUrl = "http://my-website:8080/checkout-success"
|
|
66
|
-
const successUrl = "http://my-website:8080/3ds-success"
|
|
67
66
|
|
|
68
67
|
const inlineCheckout = new InlineCheckout({
|
|
69
68
|
apiKey,
|
|
70
69
|
returnUrl,
|
|
71
|
-
successUrl
|
|
72
70
|
});
|
|
73
71
|
|
|
74
72
|
inlineCheckout.setPaymentData(checkoutData);
|
|
@@ -92,7 +90,6 @@ inlineCheckout.verify3dsTransaction().then(response => {
|
|
|
92
90
|
|-------------------|---------------|:-----------------:|-------------------------------------------------------------|
|
|
93
91
|
| apiKey | string | X | You can take this from you Tonder Dashboard |
|
|
94
92
|
| returnUrl | string | X | url where the checkout form is mounted (3ds) |
|
|
95
|
-
| successUrl | string | | |
|
|
96
93
|
| style | object | | |
|
|
97
94
|
| containerId | string | | If require a custom checkout container id, default |
|
|
98
95
|
| | | | value "tonder-checkout" |
|
|
@@ -183,7 +180,6 @@ const customStyles = {
|
|
|
183
180
|
const inlineCheckout = new InlineCheckout({
|
|
184
181
|
apiKey,
|
|
185
182
|
returnUrl,
|
|
186
|
-
successUrl,
|
|
187
183
|
styles: customStyles
|
|
188
184
|
});
|
|
189
185
|
|
|
@@ -2,23 +2,18 @@ type ThreeDSHandlerContructor = {
|
|
|
2
2
|
payload?: any;
|
|
3
3
|
apiKey?: string;
|
|
4
4
|
baseUrl?: string;
|
|
5
|
-
successUrl?: Location | string;
|
|
6
5
|
};
|
|
7
6
|
export declare class ThreeDSHandler {
|
|
8
7
|
baseUrl?: string;
|
|
9
8
|
apiKey?: string;
|
|
10
9
|
payload?: any;
|
|
11
|
-
successUrl?: Location | string;
|
|
12
10
|
localStorageKey: string;
|
|
13
|
-
constructor({ payload, apiKey, baseUrl,
|
|
11
|
+
constructor({ payload, apiKey, baseUrl, }: ThreeDSHandlerContructor);
|
|
14
12
|
setStorageItem(data: any): void;
|
|
15
13
|
getStorageItem(): string | null;
|
|
16
14
|
removeStorageItem(): void;
|
|
17
15
|
saveVerifyTransactionUrl(): void;
|
|
18
16
|
saveUrlWithExpiration(url: string): void;
|
|
19
|
-
saveCheckoutId(checkoutId: any): void;
|
|
20
|
-
removeCheckoutId(): void;
|
|
21
|
-
getCurrentCheckoutId(): any;
|
|
22
17
|
getUrlWithExpiration(): any;
|
|
23
18
|
removeVerifyTransactionUrl(): void;
|
|
24
19
|
getVerifyTransactionUrl(): string | null;
|
|
@@ -5,11 +5,10 @@ import { ErrorResponse } from '@tonder.io/ionic-lite-sdk/dist/classes/errorRespo
|
|
|
5
5
|
import { Business, PaymentData, OrderItem } from '@tonder.io/ionic-lite-sdk/dist/types/commons';
|
|
6
6
|
import { CustomerRegisterResponse, StartCheckoutResponse } from '@tonder.io/ionic-lite-sdk/dist/types/responses';
|
|
7
7
|
import { InCollectorContainer } from '../helpers/skyflow';
|
|
8
|
-
import { APM } from '
|
|
8
|
+
import { APM } from '@tonder.io/ionic-lite-sdk/dist/types/commons';
|
|
9
9
|
export type InlineCheckoutConstructor = {
|
|
10
10
|
returnUrl: string;
|
|
11
11
|
apiKey: string;
|
|
12
|
-
successUrl?: string;
|
|
13
12
|
renderPaymentButton: boolean;
|
|
14
13
|
renderSaveCardButton?: boolean;
|
|
15
14
|
callBack?: (params: any) => void;
|
|
@@ -18,6 +17,7 @@ export type InlineCheckoutConstructor = {
|
|
|
18
17
|
collectorIds?: CollectorIds;
|
|
19
18
|
isOpenPaySandbox?: boolean;
|
|
20
19
|
isEnrollmentCard?: boolean;
|
|
20
|
+
mode?: 'production' | 'stage' | 'sandbox' | 'development';
|
|
21
21
|
};
|
|
22
22
|
export declare class InlineCheckout {
|
|
23
23
|
#private;
|
|
@@ -28,7 +28,6 @@ export declare class InlineCheckout {
|
|
|
28
28
|
cartTotal?: string | null | number;
|
|
29
29
|
apiKeyTonder: string;
|
|
30
30
|
returnUrl?: string;
|
|
31
|
-
successUrl?: string;
|
|
32
31
|
renderPaymentButton: boolean;
|
|
33
32
|
renderSaveCardButton?: boolean;
|
|
34
33
|
callBack: (params: any) => void;
|
|
@@ -64,7 +63,8 @@ export declare class InlineCheckout {
|
|
|
64
63
|
card: {};
|
|
65
64
|
currency: string;
|
|
66
65
|
isEnrollmentCard: boolean;
|
|
67
|
-
|
|
66
|
+
mode: 'production' | 'stage' | 'sandbox' | 'development';
|
|
67
|
+
constructor({ apiKey, returnUrl, renderPaymentButton, callBack, styles, containerId, collectorIds, isOpenPaySandbox, isEnrollmentCard, renderSaveCardButton, mode, }: InlineCheckoutConstructor);
|
|
68
68
|
handle3dsRedirect(response: ErrorResponse | StartCheckoutResponse | false | undefined): Promise<false | ErrorResponse | StartCheckoutResponse | undefined>;
|
|
69
69
|
payment(data: any): Promise<unknown>;
|
|
70
70
|
setCartItems(items: OrderItem[]): void;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
declare enum PAYMENT_METHOD {
|
|
2
|
+
SORIANA = "SORIANA",
|
|
3
|
+
OXXO = "OXXO",
|
|
4
|
+
SPEI = "SPEI",
|
|
5
|
+
CODI = "CODI",
|
|
6
|
+
MERCADOPAGO = "MERCADOPAGO",
|
|
7
|
+
PAYPAL = "PAYPAL",
|
|
8
|
+
COMERCIALMEXICANA = "COMERCIALMEXICANA",
|
|
9
|
+
BANCOMER = "BANCOMER",
|
|
10
|
+
WALMART = "WALMART",
|
|
11
|
+
BODEGA = "BODEGA",
|
|
12
|
+
SAMSCLUB = "SAMSCLUB",
|
|
13
|
+
SUPERAMA = "SUPERAMA",
|
|
14
|
+
CALIMAX = "CALIMAX",
|
|
15
|
+
EXTRA = "EXTRA",
|
|
16
|
+
CIRCULOK = "CIRCULOK",
|
|
17
|
+
SEVEN11 = "7ELEVEN",
|
|
18
|
+
TELECOMM = "TELECOMM",
|
|
19
|
+
BANORTE = "BANORTE",
|
|
20
|
+
BENAVIDES = "BENAVIDES",
|
|
21
|
+
DELAHORRO = "DELAHORRO",
|
|
22
|
+
ELASTURIANO = "ELASTURIANO",
|
|
23
|
+
WALDOS = "WALDOS",
|
|
24
|
+
ALSUPER = "ALSUPER",
|
|
25
|
+
KIOSKO = "KIOSKO",
|
|
26
|
+
STAMARIA = "STAMARIA",
|
|
27
|
+
LAMASBARATA = "LAMASBARATA",
|
|
28
|
+
FARMROMA = "FARMROMA",
|
|
29
|
+
FARMUNION = "FARMUNION",
|
|
30
|
+
FARMATODO = "FARMATODO",
|
|
31
|
+
SFDEASIS = "SFDEASIS",
|
|
32
|
+
FARM911 = "FARM911",
|
|
33
|
+
FARMECONOMICAS = "FARMECONOMICAS",
|
|
34
|
+
FARMMEDICITY = "FARMMEDICITY",
|
|
35
|
+
RIANXEIRA = "RIANXEIRA",
|
|
36
|
+
WESTERNUNION = "WESTERNUNION",
|
|
37
|
+
ZONAPAGO = "ZONAPAGO",
|
|
38
|
+
CAJALOSANDES = "CAJALOSANDES",
|
|
39
|
+
CAJAPAITA = "CAJAPAITA",
|
|
40
|
+
CAJASANTA = "CAJASANTA",
|
|
41
|
+
CAJASULLANA = "CAJASULLANA",
|
|
42
|
+
CAJATRUJILLO = "CAJATRUJILLO",
|
|
43
|
+
EDPYME = "EDPYME",
|
|
44
|
+
KASNET = "KASNET",
|
|
45
|
+
NORANDINO = "NORANDINO",
|
|
46
|
+
QAPAQ = "QAPAQ",
|
|
47
|
+
RAIZ = "RAIZ",
|
|
48
|
+
PAYSER = "PAYSER",
|
|
49
|
+
WUNION = "WUNION",
|
|
50
|
+
BANCOCONTINENTAL = "BANCOCONTINENTAL",
|
|
51
|
+
GMONEY = "GMONEY",
|
|
52
|
+
GOPAY = "GOPAY",
|
|
53
|
+
WU = "WU",
|
|
54
|
+
PUNTOSHEY = "PUNTOSHEY",
|
|
55
|
+
AMPM = "AMPM",
|
|
56
|
+
JUMBOMARKET = "JUMBOMARKET",
|
|
57
|
+
SMELPUEBLO = "SMELPUEBLO",
|
|
58
|
+
BAM = "BAM",
|
|
59
|
+
REFACIL = "REFACIL",
|
|
60
|
+
ACYVALORES = "ACYVALORES"
|
|
61
|
+
}
|
|
62
|
+
export { PAYMENT_METHOD };
|
|
@@ -11,4 +11,4 @@ export type InCollectorContainer = {
|
|
|
11
11
|
[index: string]: CollectElement | ComposableElement | RevealElement;
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
export declare function initSkyflow(vaultId: string, vaultUrl: string, baseUrl: string, signal: AbortSignal, customStyles: any
|
|
14
|
+
export declare function initSkyflow(vaultId: string, vaultUrl: string, baseUrl: string, signal: AbortSignal, customStyles: any, collectorIds: CollectorIds, apiKey: string): Promise<InCollectorContainer>;
|
package/dist/helpers/utils.d.ts
CHANGED