@odus/checkout 0.13.0 → 0.14.0-beta.1

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