@tonder.io/ionic-full-sdk 0.0.36-beta.1 → 0.0.36-beta.2

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/.idea/aws.xml ADDED
@@ -0,0 +1,17 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="accountSettings">
4
+ <option name="activeProfile" value="profile:default" />
5
+ <option name="activeRegion" value="us-east-1" />
6
+ <option name="recentlyUsedProfiles">
7
+ <list>
8
+ <option value="profile:default" />
9
+ </list>
10
+ </option>
11
+ <option name="recentlyUsedRegions">
12
+ <list>
13
+ <option value="us-east-1" />
14
+ </list>
15
+ </option>
16
+ </component>
17
+ </project>
package/README.md CHANGED
@@ -69,9 +69,15 @@ const inlineCheckout = new InlineCheckout({
69
69
  returnUrl,
70
70
  });
71
71
 
72
+
72
73
  inlineCheckout.setPaymentData(checkoutData);
73
74
  inlineCheckout.setCartTotal(checkoutData.cart.total);
74
- inlineCheckout.setCustomerEmail(checkoutData.cart.email);
75
+
76
+ // The configureCheckout function allows you to set initial information,
77
+ // such as the customer's email, which is used to retrieve a list of saved cards.
78
+ // You can refer to the Customer interface for the complete object structure that can be passed.
79
+ inlineCheckout.configureCheckout({customer: {email: "example@email.com"}});
80
+
75
81
  inlineCheckout.injectCheckout();
76
82
 
77
83
  // To verify a 3ds transaction you can use the following method
@@ -2,7 +2,7 @@ import { Card, CollectorIds } from '../helpers/template';
2
2
  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
- import { Business, PaymentData, OrderItem } from '@tonder.io/ionic-lite-sdk/dist/types/commons';
5
+ import { Business, Customer, PaymentData, OrderItem } from '@tonder.io/ionic-lite-sdk/dist/types/commons';
6
6
  import { CustomerRegisterResponse, StartCheckoutResponse } from '@tonder.io/ionic-lite-sdk/dist/types/responses';
7
7
  import { InCollectorContainer } from '../helpers/skyflow';
8
8
  import { APM } from '@tonder.io/ionic-lite-sdk/dist/types/commons';
@@ -68,7 +68,13 @@ export declare class InlineCheckout {
68
68
  handle3dsRedirect(response: ErrorResponse | StartCheckoutResponse | false | undefined): Promise<false | ErrorResponse | StartCheckoutResponse | undefined>;
69
69
  payment(data: any): Promise<unknown>;
70
70
  setCartItems(items: OrderItem[]): void;
71
+ /**
72
+ * @deprecated This function is deprecated and will be removed in the next version. Use configureCheckout() instead.
73
+ */
71
74
  setCustomerEmail(email: string): void;
75
+ configureCheckout(data: {
76
+ customer?: Customer;
77
+ }): void;
72
78
  setPaymentData(data?: PaymentData): void;
73
79
  setCartTotal(total: string | number): void;
74
80
  setCallback(cb: any): void;