@tonder.io/ionic-full-sdk 0.0.10-beta → 0.0.11-beta

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.
@@ -0,0 +1,20 @@
1
+ type ThreeDSHandlerContructor = {
2
+ payload?: any;
3
+ apiKey?: string;
4
+ baseUrl?: string;
5
+ successUrl?: Location | string;
6
+ };
7
+ export declare class ThreeDSHandler {
8
+ baseUrl?: string;
9
+ apiKey?: string;
10
+ payload?: any;
11
+ successUrl?: Location | string;
12
+ constructor({ payload, apiKey, baseUrl, successUrl }: ThreeDSHandlerContructor);
13
+ saveVerifyTransactionUrl(): void;
14
+ removeVerifyTransactionUrl(): void;
15
+ getVerifyTransactionUrl(): string | null;
16
+ redirectTo3DS(): boolean;
17
+ getURLParameters(): any;
18
+ verifyTransactionStatus(): Promise<unknown>;
19
+ }
20
+ export {};
@@ -0,0 +1,39 @@
1
+ type CheckoutType = {
2
+ apiKey?: string;
3
+ type: string;
4
+ backgroundColor: string;
5
+ color: string;
6
+ cb: (params?: any) => void;
7
+ url: string;
8
+ };
9
+ export declare class Checkout {
10
+ url: string;
11
+ apiKey?: string;
12
+ type: string;
13
+ backgroundColor: string;
14
+ color: string;
15
+ params: string;
16
+ order: any;
17
+ buttonText: string;
18
+ cb: (params: any) => void;
19
+ tonderButton: any;
20
+ constructor({ apiKey, type, backgroundColor, color, cb, url }: CheckoutType);
21
+ generateButton: (buttonText: string) => void;
22
+ getButton: ({ buttonText }: {
23
+ buttonText: string;
24
+ }) => any;
25
+ mountButton: ({ buttonText }: {
26
+ buttonText: string;
27
+ }) => void;
28
+ stylishButton: (element: HTMLElement) => void;
29
+ setOrder: ({ products, email, shippingCost }: {
30
+ products: any;
31
+ email: string;
32
+ shippingCost: string;
33
+ }) => any;
34
+ openTabListener: (tab: any, button: HTMLButtonElement) => void;
35
+ openCheckout: () => void;
36
+ getUrlParams: () => string;
37
+ receiveMessage(event: any): void;
38
+ }
39
+ export {};
@@ -0,0 +1,68 @@
1
+ import { Card, CollectorIds } from '../helpers/template';
2
+ import { LiteCheckout } from '@tonder.io/ionic-lite-sdk';
3
+ import { ThreeDSHandler } from './3dsHandler';
4
+ import { ErrorResponse } from '@tonder.io/ionic-lite-sdk/dist/classes/errorResponse';
5
+ import { Business, PaymentData, OrderItem } from '@tonder.io/ionic-lite-sdk/dist/types/commons';
6
+ import { CustomerRegisterResponse } from '@tonder.io/ionic-lite-sdk/dist/types/responses';
7
+ import { InCollectorContainer } from '../helpers/skyflow';
8
+ export type InlineCheckoutConstructor = {
9
+ returnUrl: string;
10
+ apiKey: string;
11
+ successUrl?: string;
12
+ renderPaymentButton: boolean;
13
+ callBack?: (params: any) => void;
14
+ styles?: any;
15
+ containerId?: string;
16
+ collectorIds?: CollectorIds;
17
+ isOpenPaySandbox?: boolean;
18
+ };
19
+ export declare class InlineCheckout {
20
+ #private;
21
+ paymentData: {};
22
+ items: never[];
23
+ baseUrl: string;
24
+ collectContainer: InCollectorContainer | null;
25
+ cartTotal?: string | null | number;
26
+ apiKeyTonder: string;
27
+ returnUrl?: string;
28
+ successUrl?: string;
29
+ renderPaymentButton: boolean;
30
+ callBack: (params: any) => void;
31
+ customStyles: any;
32
+ abortController: AbortController;
33
+ process3ds: ThreeDSHandler;
34
+ cb?: () => void;
35
+ firstName?: string;
36
+ lastName?: string;
37
+ country?: string;
38
+ address?: string;
39
+ city?: string;
40
+ state?: string;
41
+ postCode?: string;
42
+ email?: string;
43
+ phone?: string;
44
+ merchantData?: Business | ErrorResponse;
45
+ cartItems?: any;
46
+ injectInterval: any;
47
+ containerId: string;
48
+ injected: boolean;
49
+ cardsInjected: boolean;
50
+ collectorIds: CollectorIds;
51
+ platforms?: string[];
52
+ liteCheckout: LiteCheckout;
53
+ clientCards: Card[];
54
+ radioChecked: string | null;
55
+ fetchingPayment: boolean;
56
+ isOpenPaySandbox: boolean;
57
+ constructor({ apiKey, returnUrl, successUrl, renderPaymentButton, callBack, styles, containerId, collectorIds, isOpenPaySandbox }: InlineCheckoutConstructor);
58
+ payment(data: any): Promise<unknown>;
59
+ setCartItems(items: OrderItem[]): void;
60
+ setCustomerEmail(email: string): void;
61
+ setPaymentData(data?: PaymentData): void;
62
+ setCartTotal(total: string | number): void;
63
+ setCallback(cb: any): void;
64
+ injectCheckout(): void;
65
+ loadCardsList(cards: Card[]): void;
66
+ getCustomer(email: string): Promise<ErrorResponse | CustomerRegisterResponse>;
67
+ removeCheckout(): void;
68
+ }
@@ -0,0 +1,14 @@
1
+ import CollectElement from "skyflow-js/types/core/external/collect/collect-element";
2
+ import { CollectorIds } from "./template";
3
+ import CollectorContainer from "skyflow-js/types/core/external/collect/collect-container";
4
+ import ComposableContainer from "skyflow-js/types/core/external/collect/compose-collect-container";
5
+ import RevealContainer from "skyflow-js/types/core/external/reveal/reveal-container";
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>;
@@ -0,0 +1 @@
1
+ export declare const defaultStyles: any;
@@ -0,0 +1,21 @@
1
+ export type CollectorIds = {
2
+ holderName: string;
3
+ cardNumber: string;
4
+ expirationMonth: string;
5
+ expirationYear: string;
6
+ cvv: string;
7
+ tonderPayButton: string;
8
+ msgError: string;
9
+ msgNotification: string;
10
+ cardsListContainer: string;
11
+ };
12
+ export type Card = {
13
+ card_scheme: string;
14
+ cardholder_name: string;
15
+ card_number: string;
16
+ expiration_month: string;
17
+ expiration_year: string;
18
+ skyflow_id: string;
19
+ };
20
+ export declare const cardTemplate: (external: boolean, collectorIds: CollectorIds) => string;
21
+ export declare const cardItemsTemplate: (external: boolean, cards: Card[]) => string;