@tonder.io/ionic-full-sdk 0.0.57-beta.develop.b746f50 → 0.0.58
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 +24 -8
- package/package.json +2 -2
- package/dist/classes/3dsHandler.d.ts +0 -39
- package/dist/classes/checkout.d.ts +0 -31
package/README.md
CHANGED
|
@@ -7,14 +7,15 @@ Tonder SDK helps to integrate the services Tonder offers in your own mobile app
|
|
|
7
7
|
1. [Installation](#installation)
|
|
8
8
|
2. [Usage](#usage)
|
|
9
9
|
3. [Configuration Options](#configuration-options)
|
|
10
|
-
4. [
|
|
11
|
-
5. [
|
|
12
|
-
|
|
13
|
-
7. [
|
|
14
|
-
8. [
|
|
15
|
-
9. [
|
|
16
|
-
10. [
|
|
17
|
-
11. [
|
|
10
|
+
4. [Card On File](#card-on-file)
|
|
11
|
+
5. [Styling InlineCheckout](#styling-inlinecheckout)
|
|
12
|
+
6. [Mobile Settings](#mobile-settings)
|
|
13
|
+
7. [Payment Data Structure](#payment-data-structure)
|
|
14
|
+
8. [API Reference](#api-reference)
|
|
15
|
+
9. [Events](#events)
|
|
16
|
+
10. [Examples](#examples)
|
|
17
|
+
11. [Deprecated Functions](#deprecated-functions)
|
|
18
|
+
12. [License](#license)
|
|
18
19
|
|
|
19
20
|
## Installation
|
|
20
21
|
|
|
@@ -112,6 +113,21 @@ const response = await inlineCheckout.payment(checkoutData);
|
|
|
112
113
|
> **Important Note about SaveCard functionality**:
|
|
113
114
|
> To properly implement the SaveCard feature, you must use a SecureToken. For detailed implementation instructions and best practices, please refer to our official documentation on [How to use SecureToken for secure card saving](https://docs.tonder.io/integration/sdks/secure-token#how-to-use-securetoken-for-secure-card-saving).
|
|
114
115
|
|
|
116
|
+
## Card On File
|
|
117
|
+
|
|
118
|
+
Card On File is handled automatically by the SDK when enabled for your merchant account.
|
|
119
|
+
|
|
120
|
+
- When Card On File is enabled, the SDK saves cards automatically to create a subscription and hides the "Save card" checkbox.
|
|
121
|
+
- `customization.saveCards.autoSave` applies only when Card On File is disabled.
|
|
122
|
+
- CVV handling for saved cards is automatic in `ionic-full`; the UI only prompts for CVV when required.
|
|
123
|
+
- If Card On File is not enabled for your merchant, contact Tonder support.
|
|
124
|
+
|
|
125
|
+
### Existing saved cards without subscription_id
|
|
126
|
+
Cards saved before Card On File was enabled may not have `subscription_id`. You have three options:
|
|
127
|
+
1) Remove the saved card (from the list) and have the user add it again.
|
|
128
|
+
2) Run a payment flow with that card; the SDK will create a subscription and update the card. Note: this can generate a new `skyflow_id`, so update any references in your app.
|
|
129
|
+
3) Ask Tonder support to remove a specific card or all saved cards for a user.
|
|
130
|
+
|
|
115
131
|
## Styling InlineCheckout
|
|
116
132
|
|
|
117
133
|
You can customize the appearance of InlineCheckout by passing a `styles` object:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tonder.io/ionic-full-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.58",
|
|
4
4
|
"description": "Tonder ionic full SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@tonder.io/ionic-lite-sdk": "^0.0.
|
|
13
|
+
"@tonder.io/ionic-lite-sdk": "^0.0.64",
|
|
14
14
|
"accordion-js": "^3.4.0",
|
|
15
15
|
"crypto-js": "^4.1.1",
|
|
16
16
|
"lodash.get": "^4.4.2",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { CustomizationOptions } from "@tonder.io/ionic-lite-sdk/dist/types/commons";
|
|
2
|
-
type ThreeDSHandlerContructor = {
|
|
3
|
-
payload?: any;
|
|
4
|
-
apiKey?: string;
|
|
5
|
-
baseUrl?: string;
|
|
6
|
-
customization?: CustomizationOptions;
|
|
7
|
-
tdsIframeId?: string;
|
|
8
|
-
callBack?: (params: any) => any;
|
|
9
|
-
};
|
|
10
|
-
export declare class ThreeDSHandler {
|
|
11
|
-
baseUrl?: string;
|
|
12
|
-
apiKey?: string;
|
|
13
|
-
payload?: any;
|
|
14
|
-
localStorageKey: string;
|
|
15
|
-
customization?: CustomizationOptions;
|
|
16
|
-
callBack?: (params: any) => any;
|
|
17
|
-
tdsIframeId?: string;
|
|
18
|
-
constructor({ payload, apiKey, baseUrl, customization, tdsIframeId, callBack }: ThreeDSHandlerContructor);
|
|
19
|
-
setStorageItem(data: any): void;
|
|
20
|
-
getStorageItem(): string | null;
|
|
21
|
-
removeStorageItem(): void;
|
|
22
|
-
saveVerifyTransactionUrl(): void;
|
|
23
|
-
saveUrlWithExpiration(url: string): void;
|
|
24
|
-
getUrlWithExpiration(): any;
|
|
25
|
-
removeVerifyTransactionUrl(): void;
|
|
26
|
-
getVerifyTransactionUrl(): string | null;
|
|
27
|
-
loadIframe(): Promise<unknown> | undefined;
|
|
28
|
-
getRedirectUrl(): any;
|
|
29
|
-
redirectToChallenge(): void;
|
|
30
|
-
getURLParameters(): any;
|
|
31
|
-
handleSuccessTransaction(response: any): any;
|
|
32
|
-
handleDeclinedTransaction(response: any): any;
|
|
33
|
-
handle3dsChallenge(response_json: any): Promise<void>;
|
|
34
|
-
handleTransactionResponse(response: any): Promise<any>;
|
|
35
|
-
requestTransactionStatus(): Promise<any>;
|
|
36
|
-
verifyTransactionStatus(): Promise<any>;
|
|
37
|
-
setPayload: (payload: any) => void;
|
|
38
|
-
}
|
|
39
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { CheckoutType } from "../types/commons";
|
|
2
|
-
export declare class Checkout {
|
|
3
|
-
url: string;
|
|
4
|
-
apiKey?: string;
|
|
5
|
-
type: string;
|
|
6
|
-
backgroundColor: string;
|
|
7
|
-
color: string;
|
|
8
|
-
params: string;
|
|
9
|
-
order: any;
|
|
10
|
-
buttonText: string;
|
|
11
|
-
cb: (params: any) => void;
|
|
12
|
-
tonderButton: any;
|
|
13
|
-
constructor({ apiKey, type, backgroundColor, color, cb, url }: CheckoutType);
|
|
14
|
-
generateButton: (buttonText: string) => void;
|
|
15
|
-
getButton: ({ buttonText }: {
|
|
16
|
-
buttonText: string;
|
|
17
|
-
}) => any;
|
|
18
|
-
mountButton: ({ buttonText }: {
|
|
19
|
-
buttonText: string;
|
|
20
|
-
}) => void;
|
|
21
|
-
stylishButton: (element: HTMLElement) => void;
|
|
22
|
-
setOrder: ({ products, email, shippingCost }: {
|
|
23
|
-
products: any;
|
|
24
|
-
email: string;
|
|
25
|
-
shippingCost: string;
|
|
26
|
-
}) => any;
|
|
27
|
-
openTabListener: (tab: any, button: HTMLButtonElement) => void;
|
|
28
|
-
openCheckout: () => void;
|
|
29
|
-
getUrlParams: () => string;
|
|
30
|
-
receiveMessage(event: any): void;
|
|
31
|
-
}
|