@odus/checkout 0.15.1 → 0.16.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.
package/README.md CHANGED
@@ -93,7 +93,6 @@ import { OdusCheckout, CheckoutConfig, CheckoutInstance, Locale } from '@odus/ch
93
93
  // Now you can use these types in your code
94
94
  const config: CheckoutConfig = {
95
95
  apiKey: 'your_api_key',
96
- profileId: 'your_profile_id',
97
96
  paymentId: 'your_payment_id',
98
97
  checkoutKey: 'your_unique_checkout_key',
99
98
  returnUrl: 'https://your-website.com/payment-complete',
@@ -119,7 +118,6 @@ import '@odus/checkout/styles';
119
118
  // Initialize the checkout
120
119
  const checkout = new OdusCheckout({
121
120
  apiKey: 'your_api_key',
122
- profileId: 'your_profile_id',
123
121
  paymentId: 'your_payment_id',
124
122
  checkoutKey: 'your_unique_checkout_key',
125
123
  returnUrl: 'https://your-website.com/payment-complete',
@@ -164,7 +162,6 @@ When initializing the Odus Checkout, you can configure various options:
164
162
  | Option | Type | Required | Description |
165
163
  | ---------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
166
164
  | `apiKey` | string | ✅ | Your Odus API key obtained from the dashboard's API Keys page |
167
- | `profileId` | string | ✅ | Your Odus checkout profile ID obtained from the dashboard's Checkout Builder page |
168
165
  | `checkoutKey` | string | ✅ | Unique checkout key for this payment session |
169
166
  | `paymentId` | string | ✅ | The ID of the payment being processed |
170
167
  | `environment` | string | ✅ | API environment to use - either 'test' or 'live' |
@@ -320,7 +317,6 @@ class OdusCheckout {
320
317
  type CheckoutConfig = {
321
318
  apiKey: string;
322
319
  returnUrl: string;
323
- profileId: string;
324
320
  checkoutKey: string;
325
321
  paymentId: string;
326
322
  environment: 'test' | 'live';
@@ -3,11 +3,13 @@ declare type Appearance = {
3
3
  paypal?: {
4
4
  enabled: boolean;
5
5
  order: number;
6
+ countries?: string[];
6
7
  };
7
8
  applePay?: {
8
9
  enabled: boolean;
9
10
  order: number;
10
11
  displayName?: string;
12
+ countries?: string[];
11
13
  };
12
14
  };
13
15
  styles?: {
@@ -36,7 +38,6 @@ declare type CheckoutCallbacks = {
36
38
  export declare type CheckoutConfig = {
37
39
  apiKey: string;
38
40
  returnUrl: string;
39
- profileId: string;
40
41
  environment: Environment;
41
42
  callbacks?: CheckoutCallbacks;
42
43
  locale?: Locale;
@@ -216,6 +217,7 @@ export declare class OdusCheckout {
216
217
  private apiService;
217
218
  private formManager;
218
219
  private stateManager;
220
+ private sessionId;
219
221
  constructor(config: CheckoutConfig);
220
222
  private validateConfig;
221
223
  mount(containerId: string): this;
@@ -223,6 +225,7 @@ export declare class OdusCheckout {
223
225
  private handleSubmit;
224
226
  private handlePaymentResponse;
225
227
  private handleAuthorizationError;
228
+ private getPaymentMethod;
226
229
  associatePayment(paymentId: string, checkoutKey: string): Promise<void>;
227
230
  }
228
231
 
@@ -288,6 +291,14 @@ export declare const ptLocale: {
288
291
  }
289
292
  };
290
293
 
294
+ export declare const pushError: (error: Error, context?: Record<string, string>) => void;
295
+
296
+ export declare const pushEvent: (name: string, attributes?: Record<string, string>) => void;
297
+
298
+ export declare const pushLog: (message: string, level?: "info" | "warn" | "error", context?: Record<string, string>) => void;
299
+
300
+ export declare const pushMeasurement: (name: string, value: number, unit?: string, context?: Record<string, string>) => void;
301
+
291
302
  export declare const trLocale: {
292
303
  "email": "E-posta",
293
304
  "cardholderNameLabel": "Kart sahibinin adı",