@tonder.io/ionic-lite-sdk 0.0.42-beta.7 → 0.0.42-beta.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.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ThreeDSHandler } from "./3dsHandler";
|
|
2
|
-
import { ErrorResponse } from "./errorResponse";
|
|
3
2
|
import { Business, IConfigureCheckout, IInlineCheckoutBaseOptions, CustomizationOptions } from "../types/commons";
|
|
4
3
|
import { ICustomer } from "../types/customer";
|
|
5
4
|
import { IItem, IProcessPaymentRequest, IStartCheckoutResponse } from "../types/checkout";
|
|
@@ -33,7 +32,7 @@ export declare class BaseInlineCheckout {
|
|
|
33
32
|
configureCheckout(data: IConfigureCheckout): void;
|
|
34
33
|
verify3dsTransaction(): Promise<ITransaction | IStartCheckoutResponse | void>;
|
|
35
34
|
payment(data: IProcessPaymentRequest): Promise<IStartCheckoutResponse>;
|
|
36
|
-
getSecureToken(): Promise<GetSecureTokenResponse
|
|
35
|
+
getSecureToken(): Promise<GetSecureTokenResponse>;
|
|
37
36
|
_initializeCheckout(): Promise<void>;
|
|
38
37
|
_checkout(data: any): Promise<any>;
|
|
39
38
|
_setCartTotal(total: string | number): void;
|
package/dist/data/tokenApi.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
import { GetSecureTokenResponse } from "../types/responses";
|
|
2
|
-
|
|
3
|
-
export declare function getSecureToken(baseUrl: string, token: string, signal?: null): Promise<GetSecureTokenResponse | ErrorResponse>;
|
|
2
|
+
export declare function getSecureToken(baseUrl: string, token: string, signal?: null): Promise<GetSecureTokenResponse>;
|
|
@@ -88,7 +88,7 @@ export interface ILiteCheckout {
|
|
|
88
88
|
*
|
|
89
89
|
* @public
|
|
90
90
|
*/
|
|
91
|
-
getSecureToken(): Promise<GetSecureTokenResponse
|
|
91
|
+
getSecureToken(): Promise<GetSecureTokenResponse>;
|
|
92
92
|
/**
|
|
93
93
|
* @deprecated This method is deprecated and will be removed in a future release.
|
|
94
94
|
* It is no longer necessary to use this method, now automatically handled
|
package/package.json
CHANGED
|
@@ -23,7 +23,12 @@ import {
|
|
|
23
23
|
saveCustomerCard,
|
|
24
24
|
} from "../data/cardApi";
|
|
25
25
|
import { fetchCustomerPaymentMethods } from "../data/paymentMethodApi";
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
Business,
|
|
28
|
+
IConfigureCheckout,
|
|
29
|
+
IInlineCheckoutBaseOptions,
|
|
30
|
+
CustomizationOptions,
|
|
31
|
+
} from "../types/commons";
|
|
27
32
|
import {ICustomer} from "../types/customer";
|
|
28
33
|
import {ICardFields, IItem, IProcessPaymentRequest, IStartCheckoutResponse} from "../types/checkout";
|
|
29
34
|
import {ICustomerCardsResponse, ISaveCardResponse, ISaveCardSkyflowRequest} from "../types/card";
|
|
@@ -139,7 +144,7 @@ export class BaseInlineCheckout {
|
|
|
139
144
|
});
|
|
140
145
|
}
|
|
141
146
|
|
|
142
|
-
async getSecureToken(): Promise<GetSecureTokenResponse
|
|
147
|
+
async getSecureToken(): Promise<GetSecureTokenResponse> {
|
|
143
148
|
try {
|
|
144
149
|
return await getSecureToken(this.baseUrl, this.secureToken)
|
|
145
150
|
} catch (error) {
|
package/src/data/tokenApi.ts
CHANGED
|
@@ -3,13 +3,12 @@ import {
|
|
|
3
3
|
buildErrorResponse,
|
|
4
4
|
buildErrorResponseFromCatch,
|
|
5
5
|
} from "../helpers/utils";
|
|
6
|
-
import { ErrorResponse } from "../classes/errorResponse";
|
|
7
6
|
|
|
8
7
|
export async function getSecureToken(
|
|
9
8
|
baseUrl: string,
|
|
10
9
|
token: string,
|
|
11
10
|
signal = null,
|
|
12
|
-
): Promise<GetSecureTokenResponse
|
|
11
|
+
): Promise<GetSecureTokenResponse> {
|
|
13
12
|
try {
|
|
14
13
|
const response = await fetch(`${baseUrl}/api/secure-token/`, {
|
|
15
14
|
method: "POST",
|
|
@@ -117,7 +117,7 @@ export interface ILiteCheckout {
|
|
|
117
117
|
*
|
|
118
118
|
* @public
|
|
119
119
|
*/
|
|
120
|
-
getSecureToken(): Promise<GetSecureTokenResponse
|
|
120
|
+
getSecureToken(): Promise<GetSecureTokenResponse>
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
123
|
* @deprecated This method is deprecated and will be removed in a future release.
|