tonder-web-sdk 1.15.2 → 1.16.3

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.
Files changed (46) hide show
  1. package/.husky/pre-commit +4 -0
  2. package/.prettierignore +8 -0
  3. package/.prettierrc +10 -0
  4. package/README.md +189 -35
  5. package/eslint.config.mjs +15 -0
  6. package/package.json +21 -4
  7. package/src/classes/3dsHandler.js +58 -62
  8. package/src/classes/BaseInlineCheckout.js +21 -36
  9. package/src/classes/LiteInlineCheckout.js +8 -8
  10. package/src/classes/checkout.js +75 -71
  11. package/src/classes/globalLoader.js +9 -7
  12. package/src/classes/inlineCheckout.js +528 -250
  13. package/src/data/apmApi.js +8 -14
  14. package/src/data/businessApi.js +5 -8
  15. package/src/data/cardApi.js +5 -14
  16. package/src/data/checkoutApi.js +54 -54
  17. package/src/data/customerApi.js +1 -6
  18. package/src/data/index.js +15 -15
  19. package/src/data/openPayApi.js +7 -7
  20. package/src/data/skyflowApi.js +14 -16
  21. package/src/helpers/skyflow.js +210 -119
  22. package/src/helpers/styles.js +56 -27
  23. package/src/helpers/template-skeleton.js +1 -1
  24. package/src/helpers/template.js +984 -541
  25. package/src/helpers/utils.js +152 -58
  26. package/src/helpers/validations.js +34 -35
  27. package/src/index-dev.js +38 -11
  28. package/src/index.html +20 -12
  29. package/src/index.js +19 -13
  30. package/src/shared/catalog/commonLogosCatalog.js +7 -0
  31. package/src/shared/catalog/paymentMethodsCatalog.js +242 -243
  32. package/src/shared/constants/colors.js +15 -0
  33. package/src/shared/constants/displayMode.js +4 -0
  34. package/src/shared/constants/fieldPathNames.js +4 -0
  35. package/src/shared/constants/htmlTonderIds.js +18 -0
  36. package/src/shared/constants/messages.js +10 -9
  37. package/types/card.d.ts +17 -17
  38. package/types/checkout.d.ts +85 -87
  39. package/types/common.d.ts +4 -1
  40. package/types/customer.d.ts +10 -10
  41. package/types/index.d.ts +9 -11
  42. package/types/inlineCheckout.d.ts +81 -61
  43. package/types/liteInlineCheckout.d.ts +78 -83
  44. package/types/paymentMethod.d.ts +17 -17
  45. package/types/transaction.d.ts +94 -94
  46. package/v1/bundle.min.js +3 -3
@@ -1,101 +1,101 @@
1
1
  export interface ITransaction {
2
+ id: number;
3
+ provider: string;
4
+ country: string;
5
+ currency_code: string;
6
+ transaction_status: string;
7
+ created: string;
8
+ modified: string;
9
+ operation_date: string;
10
+ transaction_reference: string;
11
+ transaction_type: string;
12
+ status: string;
13
+ amount: string;
14
+ related_transaction_reference?: null | string;
15
+ reason?: null | string;
16
+ is_refunded?: null | boolean;
17
+ is_disputed?: null | boolean;
18
+ number_of_payment_attempts: number;
19
+ card_brand?: null | string;
20
+ number_of_installments: number;
21
+ payment?: {
2
22
  id: number;
3
- provider: string;
4
- country: string;
5
- currency_code: string;
6
- transaction_status: string;
7
23
  created: string;
8
24
  modified: string;
9
- operation_date: string;
10
- transaction_reference: string;
11
- transaction_type: string;
12
- status: string;
13
25
  amount: string;
14
- related_transaction_reference?: null | string;
15
- reason?: null | string;
16
- is_refunded?: null | boolean;
17
- is_disputed?: null | boolean;
18
- number_of_payment_attempts: number;
19
- card_brand?: null | string;
20
- number_of_installments: number;
21
- payment?: {
22
- id: number;
23
- created: string;
24
- modified: string;
25
- amount: string;
26
- status: string;
27
- date: string;
28
- paid_date: null | string;
29
- source: null | string;
30
- customer_order_reference: null | string;
31
- client: number;
32
- business: number;
33
- shipping_address?: null | string;
34
- billing_address?: null | string;
35
- order: number;
36
- };
37
- checkout: {
38
- id: string;
39
- created: string;
40
- modified: string;
41
- checkout_data: {
42
- name: string;
43
- amount: number;
44
- source: string;
45
- id_ship: string;
46
- currency: string;
47
- order_id: number;
48
- token_id: string;
49
- last_name: string;
50
- id_product: string;
51
- ip_address: string;
52
- payment_id: number;
53
- return_url: string;
54
- title_ship: string;
55
- business_id: number;
56
- checkout_id: string;
57
- description: string;
58
- browser_info: {
59
- language: string;
60
- time_zone: number;
61
- user_agent: string;
62
- color_depth: number;
63
- screen_width: number;
64
- screen_height: number;
65
- javascript_enabled: boolean;
66
- };
67
- email_client: string;
68
- phone_number: string;
69
- instance_id_ship: string;
70
- quantity_product: number;
71
- device_session_id: null | string;
72
- number_of_payment_attempts: number;
73
- };
74
- number_of_payment_attempts: number;
75
- tried_psps: string[];
76
- rejected_transactions: string[];
77
- routing_step: number;
78
- route_length: number;
79
- last_status: string;
80
- ip_address: string;
81
- is_dynamic_routing: boolean;
82
- is_route_finished: boolean;
83
- business: number;
84
- payment: number;
85
- };
86
- currency: {
87
- id: number;
88
- name: string;
89
- code: string;
90
- symbol: string;
91
- country: null | string;
92
- };
93
- payment_method?: null | {
94
- id: number;
95
- name: string;
96
- display_name: string;
97
- category: string;
98
- is_apm: boolean;
26
+ status: string;
27
+ date: string;
28
+ paid_date: null | string;
29
+ source: null | string;
30
+ customer_order_reference: null | string;
31
+ client: number;
32
+ business: number;
33
+ shipping_address?: null | string;
34
+ billing_address?: null | string;
35
+ order: number;
36
+ };
37
+ checkout: {
38
+ id: string;
39
+ created: string;
40
+ modified: string;
41
+ checkout_data: {
42
+ name: string;
43
+ amount: number;
44
+ source: string;
45
+ id_ship: string;
46
+ currency: string;
47
+ order_id: number;
48
+ token_id: string;
49
+ last_name: string;
50
+ id_product: string;
51
+ ip_address: string;
52
+ payment_id: number;
53
+ return_url: string;
54
+ title_ship: string;
55
+ business_id: number;
56
+ checkout_id: string;
57
+ description: string;
58
+ browser_info: {
59
+ language: string;
60
+ time_zone: number;
61
+ user_agent: string;
62
+ color_depth: number;
63
+ screen_width: number;
64
+ screen_height: number;
65
+ javascript_enabled: boolean;
66
+ };
67
+ email_client: string;
68
+ phone_number: string;
69
+ instance_id_ship: string;
70
+ quantity_product: number;
71
+ device_session_id: null | string;
72
+ number_of_payment_attempts: number;
99
73
  };
100
- issuing_country?: null | string;
74
+ number_of_payment_attempts: number;
75
+ tried_psps: string[];
76
+ rejected_transactions: string[];
77
+ routing_step: number;
78
+ route_length: number;
79
+ last_status: string;
80
+ ip_address: string;
81
+ is_dynamic_routing: boolean;
82
+ is_route_finished: boolean;
83
+ business: number;
84
+ payment: number;
85
+ };
86
+ currency: {
87
+ id: number;
88
+ name: string;
89
+ code: string;
90
+ symbol: string;
91
+ country: null | string;
92
+ };
93
+ payment_method?: null | {
94
+ id: number;
95
+ name: string;
96
+ display_name: string;
97
+ category: string;
98
+ is_apm: boolean;
99
+ };
100
+ issuing_country?: null | string;
101
101
  }