@tonder.io/ionic-full-sdk 0.0.32-beta → 0.0.34-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.
- package/README.md +10 -1
- package/dist/classes/3dsHandler.d.ts +5 -1
- package/dist/classes/inlineCheckout.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/types/commons.d.ts +1 -0
- package/package.json +2 -2
- package/src/classes/3dsHandler.ts +26 -8
- package/src/classes/inlineCheckout.ts +56 -33
- package/src/index-dev.js +3 -1
- package/src/types/commons.ts +1 -0
package/README.md
CHANGED
|
@@ -76,13 +76,22 @@ inlineCheckout.setCartTotal(checkoutData.cart.total);
|
|
|
76
76
|
inlineCheckout.setCustomerEmail(checkoutData.cart.email);
|
|
77
77
|
inlineCheckout.injectCheckout();
|
|
78
78
|
|
|
79
|
+
// To verify a 3ds transaction you can use the following method
|
|
80
|
+
// It should be called after the injectCheckout method
|
|
81
|
+
// The response status will be one of the following
|
|
82
|
+
// ['Declined', 'Cancelled', 'Failed', 'Success', 'Pending', 'Authorized']
|
|
83
|
+
|
|
84
|
+
inlineCheckout.verify3dsTransaction().then(response => {
|
|
85
|
+
console.log('Verify 3ds response', response)
|
|
86
|
+
})
|
|
87
|
+
|
|
79
88
|
```
|
|
80
89
|
|
|
81
90
|
## Configuration
|
|
82
91
|
| Property | Type | Required | Description |
|
|
83
92
|
|-------------------|---------------|:-----------------:|-------------------------------------------------------------|
|
|
84
93
|
| apiKey | string | X | You can take this from you Tonder Dashboard |
|
|
85
|
-
| returnUrl | string | X |
|
|
94
|
+
| returnUrl | string | X | url where the checkout form is mounted (3ds) |
|
|
86
95
|
| successUrl | string | | |
|
|
87
96
|
| style | object | | |
|
|
88
97
|
| containerId | string | | If require a custom checkout container id, default |
|
|
@@ -16,6 +16,9 @@ export declare class ThreeDSHandler {
|
|
|
16
16
|
removeStorageItem(): void;
|
|
17
17
|
saveVerifyTransactionUrl(): void;
|
|
18
18
|
saveUrlWithExpiration(url: string): void;
|
|
19
|
+
saveCheckoutId(checkoutId: any): void;
|
|
20
|
+
removeCheckoutId(): void;
|
|
21
|
+
getCurrentCheckoutId(): any;
|
|
19
22
|
getUrlWithExpiration(): any;
|
|
20
23
|
removeVerifyTransactionUrl(): void;
|
|
21
24
|
getVerifyTransactionUrl(): string | null;
|
|
@@ -24,9 +27,10 @@ export declare class ThreeDSHandler {
|
|
|
24
27
|
redirectToChallenge(): void;
|
|
25
28
|
getURLParameters(): any;
|
|
26
29
|
handleSuccessTransaction(response: any): any;
|
|
27
|
-
handleDeclinedTransaction(response: any):
|
|
30
|
+
handleDeclinedTransaction(response: any): any;
|
|
28
31
|
handle3dsChallenge(response_json: any): Promise<void>;
|
|
29
32
|
handleTransactionResponse(response: any): Promise<any>;
|
|
30
33
|
verifyTransactionStatus(): Promise<any>;
|
|
34
|
+
setPayload: (payload: any) => void;
|
|
31
35
|
}
|
|
32
36
|
export {};
|
|
@@ -3,7 +3,7 @@ import { LiteCheckout } from '@tonder.io/ionic-lite-sdk';
|
|
|
3
3
|
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
|
-
import { CustomerRegisterResponse } from '@tonder.io/ionic-lite-sdk/dist/types/responses';
|
|
6
|
+
import { CustomerRegisterResponse, StartCheckoutResponse } from '@tonder.io/ionic-lite-sdk/dist/types/responses';
|
|
7
7
|
import { InCollectorContainer } from '../helpers/skyflow';
|
|
8
8
|
export type InlineCheckoutConstructor = {
|
|
9
9
|
returnUrl: string;
|
|
@@ -62,6 +62,7 @@ export declare class InlineCheckout {
|
|
|
62
62
|
currency: string;
|
|
63
63
|
isEnrollmentCard: boolean;
|
|
64
64
|
constructor({ apiKey, returnUrl, successUrl, renderPaymentButton, callBack, styles, containerId, collectorIds, isOpenPaySandbox, isEnrollmentCard, renderSaveCardButton, }: InlineCheckoutConstructor);
|
|
65
|
+
handle3dsRedirect(response: ErrorResponse | StartCheckoutResponse | false | undefined): Promise<false | ErrorResponse | StartCheckoutResponse | undefined>;
|
|
65
66
|
payment(data: any): Promise<unknown>;
|
|
66
67
|
setCartItems(items: OrderItem[]): void;
|
|
67
68
|
setCustomerEmail(email: string): void;
|
|
@@ -69,6 +70,8 @@ export declare class InlineCheckout {
|
|
|
69
70
|
setCartTotal(total: string | number): void;
|
|
70
71
|
setCallback(cb: any): void;
|
|
71
72
|
injectCheckout(): void;
|
|
73
|
+
verify3dsTransaction(): Promise<any>;
|
|
74
|
+
resumeCheckout(response: any): Promise<any>;
|
|
72
75
|
loadCardsList(cards: Card[], token: string): void;
|
|
73
76
|
getCustomer(email: string): Promise<ErrorResponse | CustomerRegisterResponse>;
|
|
74
77
|
removeCheckout(): void;
|