tonder-web-sdk 1.12.0-beta.4 → 1.12.0-beta.6

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.
@@ -110,7 +110,7 @@
110
110
  <workItem from="1723774667217" duration="11739000" />
111
111
  <workItem from="1723855727317" duration="20341000" />
112
112
  <workItem from="1723952592527" duration="17418000" />
113
- <workItem from="1724247675743" duration="28791000" />
113
+ <workItem from="1724247675743" duration="29819000" />
114
114
  </task>
115
115
  <servers />
116
116
  </component>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tonder-web-sdk",
3
- "version": "1.12.0-beta.4",
3
+ "version": "1.12.0-beta.6",
4
4
  "description": "tonder sdk for integrations",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -58,7 +58,7 @@ export class BaseInlineCheckout {
58
58
  /**
59
59
  * Processes a payment.
60
60
  * @param {import("../../types").IProcessPaymentRequest} data - Payment data including customer, cart, and other relevant information.
61
- * @returns {Promise<import("../../types").IStartCheckoutResponse> | void} A promise that resolves with the payment response or 3DS redirect or is rejected with an error.
61
+ * @returns {Promise<import("../../types").IStartCheckoutResponse>} A promise that resolves with the payment response or 3DS redirect or is rejected with an error.
62
62
  *
63
63
  * @throws {Error} Throws an error if the checkout process fails. The error object contains
64
64
  * additional `details` property with the response from the server if available.
@@ -259,7 +259,7 @@ export class InlineCheckout extends BaseInlineCheckout{
259
259
  const saveCard = document.getElementById("save-checkout-card");
260
260
  if (saveCard && "checked" in saveCard && saveCard.checked) {
261
261
  try {
262
- await saveCustomerCard(this.baseUrl, auth_token, 6655555, {
262
+ await saveCustomerCard(this.baseUrl, auth_token, business.pk, {
263
263
  skyflow_id: cardTokens.skyflow_id,
264
264
  });
265
265
  showMessage(MESSAGES.cardSaved, this.collectorIds.msgNotification);
@@ -1,4 +1,6 @@
1
1
  import {IConfigureCheckout, IInlineCheckoutBaseOptions} from "./common";
2
+ import {IProcessPaymentRequest, IStartCheckoutResponse} from "./checkout";
3
+ import {ITransaction} from "./transaction";
2
4
 
3
5
  export class InlineCheckout {
4
6
  constructor(options: IInlineCheckoutOptions);
@@ -7,9 +9,9 @@ export class InlineCheckout {
7
9
 
8
10
  injectCheckout(): Promise<void>;
9
11
 
10
- payment(): Promise<void>;
12
+ payment(data: IProcessPaymentRequest): Promise<IStartCheckoutResponse>;
11
13
 
12
- verify3dsTransaction(): Promise<void>;
14
+ verify3dsTransaction(): Promise<ITransaction | void>;
13
15
 
14
16
  removeCheckout(): void;
15
17
  }
@@ -1,6 +1,8 @@
1
1
  import {IConfigureCheckout, IInlineCheckoutBaseOptions} from "./common";
2
2
  import {ICustomerCardsResponse, ISaveCardRequest, ISaveCardResponse} from "./card";
3
3
  import {IPaymentMethod} from "./paymentMethod";
4
+ import {IProcessPaymentRequest, IStartCheckoutResponse} from "./checkout";
5
+ import {ITransaction} from "./transaction";
4
6
 
5
7
  export class LiteInlineCheckout {
6
8
  constructor(options: IInlineLiteCheckoutOptions);
@@ -9,9 +11,9 @@ export class LiteInlineCheckout {
9
11
 
10
12
  injectCheckout(): Promise<void>;
11
13
 
12
- payment(): Promise<void>;
14
+ payment(data: IProcessPaymentRequest): Promise<IStartCheckoutResponse>;
13
15
 
14
- verify3dsTransaction(): Promise<void>;
16
+ verify3dsTransaction(): Promise<ITransaction | void>;
15
17
 
16
18
  getCustomerCards(
17
19
  authToken: string,