@odus/checkout 0.13.0 → 0.14.0-beta.0

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,3 +1,27 @@
1
+ declare type Appearance = {
2
+ additionalPaymentMethods?: {
3
+ paypal?: {
4
+ enabled: boolean;
5
+ order: number;
6
+ };
7
+ };
8
+ styles?: {
9
+ borderRadius: number;
10
+ buttonColor: string;
11
+ buttonFontSize: number;
12
+ buttonTextColor: string;
13
+ fontFamily: string;
14
+ fontSize: number;
15
+ textColor: string;
16
+ };
17
+ layout?: {
18
+ actionButton?: {
19
+ label: string;
20
+ translationKey: string;
21
+ };
22
+ };
23
+ };
24
+
1
25
  declare type CheckoutCallbacks = {
2
26
  onPaymentSucceeded?: (result: PaymentResult) => void;
3
27
  onPaymentFailed?: (result: string) => void;
@@ -9,13 +33,12 @@ export declare type CheckoutConfig = {
9
33
  apiKey: string;
10
34
  returnUrl: string;
11
35
  profileId: string;
12
- checkoutKey: string;
13
- paymentId: string;
14
36
  environment: Environment;
15
37
  callbacks?: CheckoutCallbacks;
16
38
  locale?: Locale;
17
39
  disableErrorMessages?: boolean;
18
40
  manualActionHandling?: boolean;
41
+ appearance?: Appearance;
19
42
  initialValues?: {
20
43
  email?: string;
21
44
  };
@@ -24,6 +47,7 @@ export declare type CheckoutConfig = {
24
47
  export declare interface CheckoutInstance {
25
48
  mount: (containerId: string) => CheckoutInstance;
26
49
  unmount: () => void;
50
+ associatePayment: (paymentId: string, checkoutKey: string) => Promise<void>;
27
51
  }
28
52
 
29
53
  export declare const deLocale: {
@@ -172,6 +196,7 @@ export declare type Locale = 'en' | 'de' | 'es' | 'fr' | 'pl' | 'pt' | 'it' | 't
172
196
 
173
197
  export declare class OdusCheckout {
174
198
  private config;
199
+ private paymentState;
175
200
  private apiService;
176
201
  private formManager;
177
202
  private stateManager;
@@ -182,6 +207,7 @@ export declare class OdusCheckout {
182
207
  private handleSubmit;
183
208
  private handlePaymentResponse;
184
209
  private handleAuthorizationError;
210
+ associatePayment(paymentId: string, checkoutKey: string): Promise<void>;
185
211
  }
186
212
 
187
213
  declare type PaymentResult = 'pending' | 'three_ds_requested' | 'authorized' | 'failed';