@tonder.io/ionic-full-sdk 0.0.2 → 0.0.4
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/classes/inlineCheckout.d.ts +3 -1
- package/dist/helpers/skyflow.d.ts +10 -1
- package/dist/helpers/template.d.ts +1 -0
- package/dist/helpers/utils.d.ts +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/classes/inlineCheckout.ts +79 -9
- package/src/helpers/skyflow.ts +39 -13
- package/src/helpers/template.ts +30 -10
- package/src/helpers/utils.ts +13 -0
|
@@ -4,6 +4,7 @@ import { ThreeDSHandler } from './3dsHandler';
|
|
|
4
4
|
import { ErrorResponse } from '@tonder.io/ionic-lite-sdk/dist/classes/errorResponse';
|
|
5
5
|
import { Business, PaymentData, OrderItem } from '@tonder.io/ionic-lite-sdk/dist/types/commons';
|
|
6
6
|
import { CustomerRegisterResponse } from '@tonder.io/ionic-lite-sdk/dist/types/responses';
|
|
7
|
+
import { InCollectorContainer } from '../helpers/skyflow';
|
|
7
8
|
export type InlineCheckoutConstructor = {
|
|
8
9
|
returnUrl: string;
|
|
9
10
|
apiKey: string;
|
|
@@ -22,7 +23,7 @@ export declare class InlineCheckout {
|
|
|
22
23
|
paymentData: {};
|
|
23
24
|
items: never[];
|
|
24
25
|
baseUrl: string;
|
|
25
|
-
collectContainer:
|
|
26
|
+
collectContainer: InCollectorContainer | null;
|
|
26
27
|
cartTotal?: string | null | number;
|
|
27
28
|
apiKeyTonder: string;
|
|
28
29
|
returnUrl?: string;
|
|
@@ -53,6 +54,7 @@ export declare class InlineCheckout {
|
|
|
53
54
|
liteCheckout: LiteCheckout;
|
|
54
55
|
clientCards: Card[];
|
|
55
56
|
radioChecked: string | null;
|
|
57
|
+
fetchingPayment: boolean;
|
|
56
58
|
constructor({ apiKey, returnUrl, successUrl, renderPaymentButton, callBack, styles, containerId, collectorIds, platforms }: InlineCheckoutConstructor);
|
|
57
59
|
payment(data: any): Promise<unknown>;
|
|
58
60
|
setCartItems(items: OrderItem[]): void;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import CollectElement from "skyflow-js/types/core/external/collect/collect-element";
|
|
1
2
|
import { CollectorIds } from "./template";
|
|
2
3
|
import CollectorContainer from "skyflow-js/types/core/external/collect/collect-container";
|
|
3
4
|
import ComposableContainer from "skyflow-js/types/core/external/collect/compose-collect-container";
|
|
4
5
|
import RevealContainer from "skyflow-js/types/core/external/reveal/reveal-container";
|
|
5
|
-
|
|
6
|
+
import RevealElement from "skyflow-js/types/core/external/reveal/reveal-element";
|
|
7
|
+
import ComposableElement from "skyflow-js/types/core/external/collect/compose-collect-element";
|
|
8
|
+
export type InCollectorContainer = {
|
|
9
|
+
container: CollectorContainer | ComposableContainer | RevealContainer;
|
|
10
|
+
elements: {
|
|
11
|
+
[index: string]: CollectElement | ComposableElement | RevealElement;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare function addScripts(): Promise<void>;
|
|
2
2
|
export declare function toCurrency(value: string | number): string | false;
|
|
3
3
|
export declare function showError(message: string, containerId: string, payButtonId: string): void;
|
|
4
|
+
export declare function showMessage(message: string, containerId: string): void;
|
|
4
5
|
export declare const createObserver: ({ target }: {
|
|
5
6
|
target: string;
|
|
6
7
|
}) => Promise<any>;
|