@pay-com/js 1.1.8 → 1.1.12

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.
@@ -251,6 +251,36 @@ export type FailureError = {
251
251
  data?: Record<string, unknown>
252
252
  }
253
253
 
254
+ export type Locale =
255
+ | 'en-US'
256
+ | 'en-GB'
257
+ | 'ro-RO'
258
+ | 'zh-CN'
259
+ | 'cs-CZ'
260
+ | 'da-DK'
261
+ | 'nl-NL'
262
+ | 'de-DE'
263
+ | 'fr-FR'
264
+ | 'fi-FI'
265
+ | 'el-GR'
266
+ | 'hu-HU'
267
+ | 'id-ID'
268
+ | 'it-IT'
269
+ | 'ja-JP'
270
+ | 'ko-KR'
271
+ | 'ko-KP'
272
+ | 'nb-NO'
273
+ | 'pl-PL'
274
+ | 'pt-PT'
275
+ | 'pt-BR'
276
+ | 'ru-RU'
277
+ | 'es-ES'
278
+ | 'se-SE'
279
+ | 'se-FI'
280
+ | 'se-NO'
281
+ | 'tr-TR'
282
+ | 'vi-VN'
283
+
254
284
  export interface CheckoutOpts {
255
285
  /**
256
286
  * @deprecated Got replaced by clientSecret
@@ -258,6 +288,7 @@ export interface CheckoutOpts {
258
288
  token?: string | (() => Promise<string>)
259
289
  clientSecret?: string | (() => Promise<string>)
260
290
  currency?: string
291
+ amount?: string
261
292
  onSuccess?: (payment: Record<string, unknown>) => void
262
293
  onFailure?: (error: FailureError) => void
263
294
  mode?: modeOpts
@@ -272,6 +303,7 @@ export interface CheckoutOpts {
272
303
  displayEndOfSessionFailureMessages?: boolean
273
304
  disableAdditionalFields?: boolean
274
305
  }
306
+ locale?: Locale
275
307
  }
276
308
 
277
309
  interface PayComI {
@@ -397,6 +429,7 @@ export type UpdateTransactionDetailsOpts = {
397
429
  state?: string
398
430
  countryAlpha2: string
399
431
  }
432
+ customFieldsValues: Record<string, string | number | boolean>
400
433
  }
401
434
 
402
435
  export type PayOpts = {
package/lib/index.d.ts CHANGED
@@ -256,6 +256,36 @@ type FailureError = {
256
256
  data?: Record<string, unknown>
257
257
  }
258
258
 
259
+ type Locale =
260
+ | 'en-US'
261
+ | 'en-GB'
262
+ | 'ro-RO'
263
+ | 'zh-CN'
264
+ | 'cs-CZ'
265
+ | 'da-DK'
266
+ | 'nl-NL'
267
+ | 'de-DE'
268
+ | 'fr-FR'
269
+ | 'fi-FI'
270
+ | 'el-GR'
271
+ | 'hu-HU'
272
+ | 'id-ID'
273
+ | 'it-IT'
274
+ | 'ja-JP'
275
+ | 'ko-KR'
276
+ | 'ko-KP'
277
+ | 'nb-NO'
278
+ | 'pl-PL'
279
+ | 'pt-PT'
280
+ | 'pt-BR'
281
+ | 'ru-RU'
282
+ | 'es-ES'
283
+ | 'se-SE'
284
+ | 'se-FI'
285
+ | 'se-NO'
286
+ | 'tr-TR'
287
+ | 'vi-VN'
288
+
259
289
  interface CheckoutOpts {
260
290
  /**
261
291
  * @deprecated Got replaced by clientSecret
@@ -263,6 +293,7 @@ interface CheckoutOpts {
263
293
  token?: string | (() => Promise<string>)
264
294
  clientSecret?: string | (() => Promise<string>)
265
295
  currency?: string
296
+ amount?: string
266
297
  onSuccess?: (payment: Record<string, unknown>) => void
267
298
  onFailure?: (error: FailureError) => void
268
299
  mode?: modeOpts
@@ -277,6 +308,7 @@ interface CheckoutOpts {
277
308
  displayEndOfSessionFailureMessages?: boolean
278
309
  disableAdditionalFields?: boolean
279
310
  }
311
+ locale?: Locale
280
312
  }
281
313
 
282
314
  interface PayComOpts {
@@ -396,6 +428,7 @@ type UpdateTransactionDetailsOpts = {
396
428
  state?: string
397
429
  countryAlpha2: string
398
430
  }
431
+ customFieldsValues: Record<string, string | number | boolean>
399
432
  }
400
433
 
401
434
  type PayOpts = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pay-com/js",
3
- "version": "1.1.8",
3
+ "version": "1.1.12",
4
4
  "description": "Pay.com JS loading utility",
5
5
  "keywords": [
6
6
  "Pay.com",