strapi-plugin-payone-provider 5.7.24 → 5.7.26

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 (83) hide show
  1. package/README.md +1191 -1191
  2. package/admin/src/components/Initializer/index.jsx +16 -16
  3. package/admin/src/components/PluginIcon/index.jsx +17 -17
  4. package/admin/src/index.js +57 -57
  5. package/admin/src/pages/App/components/AppHeader.jsx +45 -45
  6. package/admin/src/pages/App/components/AppTabs.jsx +105 -105
  7. package/admin/src/pages/App/components/ApplePayBtn.jsx +355 -355
  8. package/admin/src/pages/App/components/ApplePayConfig.jsx +357 -357
  9. package/admin/src/pages/App/components/DocsPanel.jsx +53 -53
  10. package/admin/src/pages/App/components/RenderInput.jsx +78 -78
  11. package/admin/src/pages/App/components/StatusBadge.jsx +87 -87
  12. package/admin/src/pages/App/components/icons/BankIcon.jsx +10 -10
  13. package/admin/src/pages/App/components/icons/ChevronDownIcon.jsx +9 -9
  14. package/admin/src/pages/App/components/icons/ChevronUpIcon.jsx +9 -9
  15. package/admin/src/pages/App/components/icons/CreditCardIcon.jsx +9 -9
  16. package/admin/src/pages/App/components/icons/ErrorIcon.jsx +10 -10
  17. package/admin/src/pages/App/components/icons/InfoIcon.jsx +9 -9
  18. package/admin/src/pages/App/components/icons/MarkCircle.jsx +19 -19
  19. package/admin/src/pages/App/components/icons/PaymentIcon.jsx +10 -10
  20. package/admin/src/pages/App/components/icons/PendingIcon.jsx +9 -9
  21. package/admin/src/pages/App/components/icons/PersonIcon.jsx +9 -9
  22. package/admin/src/pages/App/components/icons/SuccessIcon.jsx +9 -9
  23. package/admin/src/pages/App/components/icons/WalletIcon.jsx +9 -9
  24. package/admin/src/pages/App/components/icons/index.jsx +12 -12
  25. package/admin/src/pages/App/components/payment-actions/AuthorizationForm.jsx +334 -334
  26. package/admin/src/pages/App/components/payment-actions/CaptureForm.jsx +120 -120
  27. package/admin/src/pages/App/components/payment-actions/PaymentActionsPanel.jsx +183 -183
  28. package/admin/src/pages/App/components/payment-actions/PaymentMethodSelector.jsx +315 -315
  29. package/admin/src/pages/App/components/payment-actions/PaymentResult.jsx +129 -129
  30. package/admin/src/pages/App/components/payment-actions/PreauthorizationForm.jsx +273 -273
  31. package/admin/src/pages/App/components/payment-actions/RefundForm.jsx +114 -114
  32. package/admin/src/pages/App/components/transaction-history/ImportExportBar.jsx +153 -153
  33. package/admin/src/pages/App/components/transaction-history/details/TransactionHistoryItem.jsx +526 -526
  34. package/admin/src/pages/App/index.jsx +96 -96
  35. package/admin/src/pages/App/styles.css +176 -176
  36. package/admin/src/pages/constants/paymentConstants.js +71 -71
  37. package/admin/src/pages/hooks/use-system-theme.js +27 -27
  38. package/admin/src/pages/hooks/usePaymentActions.js +498 -498
  39. package/admin/src/pages/hooks/usePluginTranslations.js +12 -12
  40. package/admin/src/pages/hooks/useSettings.js +183 -183
  41. package/admin/src/pages/hooks/useTransactionHistory.js +148 -148
  42. package/admin/src/pages/utils/api.js +97 -97
  43. package/admin/src/pages/utils/applePayConstants.js +196 -196
  44. package/admin/src/pages/utils/formatTransactionData.js +15 -15
  45. package/admin/src/pages/utils/getInputComponent.jsx +200 -200
  46. package/admin/src/pages/utils/paymentUtils.js +661 -661
  47. package/admin/src/pages/utils/tooltipHelpers.js +18 -18
  48. package/admin/src/pages/utils/transactionTableUtils.js +71 -71
  49. package/admin/src/pluginId.js +9 -9
  50. package/admin/src/translations/de.json +235 -235
  51. package/admin/src/translations/en.json +235 -235
  52. package/admin/src/translations/fr.json +235 -235
  53. package/admin/src/translations/ru.json +235 -235
  54. package/admin/src/utils/prefixPluginTranslations.js +13 -13
  55. package/package.json +45 -45
  56. package/server/bootstrap.js +107 -107
  57. package/server/config/index.js +83 -83
  58. package/server/content-types/index.js +4 -4
  59. package/server/content-types/transactions/index.js +4 -4
  60. package/server/content-types/transactions/schema.json +86 -86
  61. package/server/controllers/index.js +7 -7
  62. package/server/controllers/payone.js +506 -451
  63. package/server/destroy.js +5 -5
  64. package/server/index.js +23 -23
  65. package/server/policies/index.js +7 -7
  66. package/server/policies/is-auth.js +29 -29
  67. package/server/policies/isSuperAdmin.js +20 -20
  68. package/server/register.js +5 -5
  69. package/server/routes/index.js +218 -218
  70. package/server/services/applePayService.js +295 -295
  71. package/server/services/index.js +9 -9
  72. package/server/services/paymentService.js +223 -223
  73. package/server/services/payone.js +78 -78
  74. package/server/services/settingsService.js +59 -59
  75. package/server/services/testConnectionService.js +115 -115
  76. package/server/services/transactionService.js +262 -262
  77. package/server/utils/csvTransactions.js +82 -82
  78. package/server/utils/normalize.js +39 -39
  79. package/server/utils/paymentMethodParams.js +288 -288
  80. package/server/utils/requestBuilder.js +100 -100
  81. package/server/utils/responseParser.js +141 -141
  82. package/strapi-admin.js +4 -4
  83. package/strapi-server.js +3 -3
@@ -1,196 +1,196 @@
1
-
2
- export const APPLE_PAY_SUPPORTED_COUNTRIES = [
3
- { code: "US", name: "United States" },
4
- { code: "GB", name: "United Kingdom" },
5
- { code: "CA", name: "Canada" },
6
- { code: "AU", name: "Australia" },
7
- { code: "DE", name: "Germany" },
8
- { code: "FR", name: "France" },
9
- { code: "IT", name: "Italy" },
10
- { code: "ES", name: "Spain" },
11
- { code: "NL", name: "Netherlands" },
12
- { code: "BE", name: "Belgium" },
13
- { code: "CH", name: "Switzerland" },
14
- { code: "AT", name: "Austria" },
15
- { code: "IE", name: "Ireland" },
16
- { code: "SE", name: "Sweden" },
17
- { code: "NO", name: "Norway" },
18
- { code: "DK", name: "Denmark" },
19
- { code: "FI", name: "Finland" },
20
- { code: "PL", name: "Poland" },
21
- { code: "CZ", name: "Czech Republic" },
22
- { code: "HU", name: "Hungary" },
23
- { code: "PT", name: "Portugal" },
24
- { code: "GR", name: "Greece" },
25
- { code: "JP", name: "Japan" },
26
- { code: "CN", name: "China" },
27
- { code: "HK", name: "Hong Kong" },
28
- { code: "TW", name: "Taiwan" },
29
- { code: "SG", name: "Singapore" },
30
- { code: "NZ", name: "New Zealand" },
31
- { code: "BR", name: "Brazil" },
32
- { code: "MX", name: "Mexico" },
33
- { code: "AE", name: "United Arab Emirates" },
34
- { code: "SA", name: "Saudi Arabia" },
35
- { code: "RU", name: "Russia" },
36
- { code: "UA", name: "Ukraine" },
37
- { code: "TR", name: "Turkey" },
38
- { code: "ZA", name: "South Africa" }
39
- ];
40
-
41
- export const APPLE_PAY_SUPPORTED_CURRENCIES = [
42
- { code: "USD", name: "US Dollar", symbol: "$" },
43
- { code: "EUR", name: "Euro", symbol: "€" },
44
- { code: "GBP", name: "British Pound", symbol: "£" },
45
- { code: "CAD", name: "Canadian Dollar", symbol: "C$" },
46
- { code: "AUD", name: "Australian Dollar", symbol: "A$" },
47
- { code: "JPY", name: "Japanese Yen", symbol: "¥" },
48
- { code: "CNY", name: "Chinese Yuan", symbol: "¥" },
49
- { code: "HKD", name: "Hong Kong Dollar", symbol: "HK$" },
50
- { code: "TWD", name: "Taiwan Dollar", symbol: "NT$" },
51
- { code: "SGD", name: "Singapore Dollar", symbol: "S$" },
52
- { code: "NZD", name: "New Zealand Dollar", symbol: "NZ$" },
53
- { code: "BRL", name: "Brazilian Real", symbol: "R$" },
54
- { code: "MXN", name: "Mexican Peso", symbol: "Mex$" },
55
- { code: "AED", name: "UAE Dirham", symbol: "د.إ" },
56
- { code: "SAR", name: "Saudi Riyal", symbol: "﷼" },
57
- { code: "RUB", name: "Russian Ruble", symbol: "₽" },
58
- { code: "UAH", name: "Ukrainian Hryvnia", symbol: "₴" },
59
- { code: "TRY", name: "Turkish Lira", symbol: "₺" },
60
- { code: "ZAR", name: "South African Rand", symbol: "R" },
61
- { code: "CHF", name: "Swiss Franc", symbol: "CHF" },
62
- { code: "SEK", name: "Swedish Krona", symbol: "kr" },
63
- { code: "NOK", name: "Norwegian Krone", symbol: "kr" },
64
- { code: "DKK", name: "Danish Krone", symbol: "kr" },
65
- { code: "PLN", name: "Polish Zloty", symbol: "zł" },
66
- { code: "CZK", name: "Czech Koruna", symbol: "Kč" },
67
- { code: "HUF", name: "Hungarian Forint", symbol: "Ft" }
68
- ];
69
-
70
- export const APPLE_PAY_SUPPORTED_NETWORKS = [
71
- { code: "amex", name: "American Express" },
72
- { code: "discover", name: "Discover" },
73
- { code: "masterCard", name: "Mastercard" },
74
- { code: "visa", name: "Visa" },
75
- { code: "maestro", name: "Maestro" },
76
- { code: "girocard", name: "Girocard" },
77
- { code: "cartesBancaires", name: "Cartes Bancaires" },
78
- { code: "chinaUnionPay", name: "China UnionPay" },
79
- { code: "jcb", name: "JCB" },
80
- { code: "interac", name: "Interac" },
81
- { code: "privateLabel", name: "Private Label" }
82
- ];
83
-
84
- export const APPLE_PAY_MERCHANT_CAPABILITIES = [
85
- { code: "supports3DS", name: "3D Secure", description: "Required for most payment methods" },
86
- { code: "supportsCredit", name: "Credit Cards", description: "Support credit card payments" },
87
- { code: "supportsDebit", name: "Debit Cards", description: "Support debit card payments" }
88
- ];
89
-
90
- export const COUNTRY_CURRENCY_RESTRICTIONS = {
91
- US: ["USD"],
92
- GB: ["GBP", "EUR"],
93
- CA: ["CAD", "USD"],
94
- AU: ["AUD"],
95
- DE: ["EUR"],
96
- FR: ["EUR"],
97
- IT: ["EUR"],
98
- ES: ["EUR"],
99
- JP: ["JPY"],
100
- CN: ["CNY"],
101
- HK: ["HKD"],
102
- TW: ["TWD"],
103
- SG: ["SGD"],
104
- NZ: ["NZD"],
105
- BR: ["BRL"],
106
- MX: ["MXN"],
107
- AE: ["AED"],
108
- SA: ["SAR"],
109
- RU: ["RUB", "USD", "EUR"],
110
- UA: ["UAH", "USD", "EUR"],
111
- TR: ["TRY", "USD", "EUR"],
112
- ZA: ["ZAR"]
113
- };
114
-
115
- export const getSupportedCurrenciesForCountry = (countryCode) => {
116
- const restrictions = COUNTRY_CURRENCY_RESTRICTIONS[countryCode];
117
- if (restrictions) {
118
- return APPLE_PAY_SUPPORTED_CURRENCIES.filter(currency =>
119
- restrictions.includes(currency.code)
120
- );
121
- }
122
- return APPLE_PAY_SUPPORTED_CURRENCIES;
123
- };
124
-
125
- export const getSupportedNetworksForCountry = (countryCode) => {
126
- const countryNetworks = {
127
- US: ["amex", "discover", "masterCard", "visa"],
128
- GB: ["amex", "masterCard", "visa", "maestro"],
129
- DE: ["masterCard", "visa", "girocard", "maestro"],
130
- FR: ["masterCard", "visa", "cartesBancaires"],
131
- CN: ["chinaUnionPay", "visa", "masterCard"],
132
- JP: ["jcb", "visa", "masterCard", "amex"],
133
- CA: ["visa", "masterCard", "amex", "interac"],
134
- AU: ["visa", "masterCard", "amex"],
135
- // Default networks for other countries
136
- default: ["visa", "masterCard", "amex"]
137
- };
138
-
139
- return countryNetworks[countryCode] || countryNetworks.default;
140
- };
141
-
142
- export const APPLE_PAY_TEST_DATA = {
143
- testCards: {
144
- visa: "4111111111111111",
145
- mastercard: "5555555555554444",
146
- amex: "378282246310005",
147
- discover: "6011111111111117"
148
- },
149
- testMerchantIdentifier: "merchant.com.payone.test",
150
- testDomain: "test.payone.com"
151
- };
152
-
153
- export const APPLE_PAY_BUTTON_STYLES = [
154
- { code: "black", name: "Black" },
155
- { code: "white", name: "White with outline" },
156
- { code: "white-outline", name: "White" }
157
- ];
158
-
159
- export const APPLE_PAY_BUTTON_TYPES = [
160
- { code: "plain", name: "Plain" },
161
- { code: "buy", name: "Buy" },
162
- { code: "donate", name: "Donate" },
163
- { code: "check-out", name: "Check Out" },
164
- { code: "book", name: "Book" },
165
- { code: "subscribe", name: "Subscribe" },
166
- { code: "reload", name: "Reload" },
167
- { code: "add-money", name: "Add Money" },
168
- { code: "top-up", name: "Top Up" },
169
- { code: "order", name: "Order" },
170
- { code: "rent", name: "Rent" },
171
- { code: "support", name: "Support" },
172
- { code: "contribute", name: "Contribute" },
173
- { code: "tip", name: "Tip" },
174
- { code: "continue", name: "Continue" },
175
- { code: "pay", name: "Pay" },
176
- { code: "set-up", name: "Set Up" }
177
- ];
178
-
179
- export const DEFAULT_APPLE_PAY_CONFIG = {
180
- countryCode: "DE",
181
- currencyCode: "EUR",
182
- merchantCapabilities: ["supports3DS"],
183
- supportedNetworks: ["visa", "masterCard", "girocard"],
184
- buttonStyle: "black",
185
- buttonType: "pay",
186
- requestPayerName: false,
187
- requestBillingAddress: false,
188
- requestPayerEmail: false,
189
- requestPayerPhone: false,
190
- requestShipping: false,
191
- shippingType: "shipping"
192
- };
193
-
194
-
195
-
196
-
1
+
2
+ export const APPLE_PAY_SUPPORTED_COUNTRIES = [
3
+ { code: "US", name: "United States" },
4
+ { code: "GB", name: "United Kingdom" },
5
+ { code: "CA", name: "Canada" },
6
+ { code: "AU", name: "Australia" },
7
+ { code: "DE", name: "Germany" },
8
+ { code: "FR", name: "France" },
9
+ { code: "IT", name: "Italy" },
10
+ { code: "ES", name: "Spain" },
11
+ { code: "NL", name: "Netherlands" },
12
+ { code: "BE", name: "Belgium" },
13
+ { code: "CH", name: "Switzerland" },
14
+ { code: "AT", name: "Austria" },
15
+ { code: "IE", name: "Ireland" },
16
+ { code: "SE", name: "Sweden" },
17
+ { code: "NO", name: "Norway" },
18
+ { code: "DK", name: "Denmark" },
19
+ { code: "FI", name: "Finland" },
20
+ { code: "PL", name: "Poland" },
21
+ { code: "CZ", name: "Czech Republic" },
22
+ { code: "HU", name: "Hungary" },
23
+ { code: "PT", name: "Portugal" },
24
+ { code: "GR", name: "Greece" },
25
+ { code: "JP", name: "Japan" },
26
+ { code: "CN", name: "China" },
27
+ { code: "HK", name: "Hong Kong" },
28
+ { code: "TW", name: "Taiwan" },
29
+ { code: "SG", name: "Singapore" },
30
+ { code: "NZ", name: "New Zealand" },
31
+ { code: "BR", name: "Brazil" },
32
+ { code: "MX", name: "Mexico" },
33
+ { code: "AE", name: "United Arab Emirates" },
34
+ { code: "SA", name: "Saudi Arabia" },
35
+ { code: "RU", name: "Russia" },
36
+ { code: "UA", name: "Ukraine" },
37
+ { code: "TR", name: "Turkey" },
38
+ { code: "ZA", name: "South Africa" }
39
+ ];
40
+
41
+ export const APPLE_PAY_SUPPORTED_CURRENCIES = [
42
+ { code: "USD", name: "US Dollar", symbol: "$" },
43
+ { code: "EUR", name: "Euro", symbol: "€" },
44
+ { code: "GBP", name: "British Pound", symbol: "£" },
45
+ { code: "CAD", name: "Canadian Dollar", symbol: "C$" },
46
+ { code: "AUD", name: "Australian Dollar", symbol: "A$" },
47
+ { code: "JPY", name: "Japanese Yen", symbol: "¥" },
48
+ { code: "CNY", name: "Chinese Yuan", symbol: "¥" },
49
+ { code: "HKD", name: "Hong Kong Dollar", symbol: "HK$" },
50
+ { code: "TWD", name: "Taiwan Dollar", symbol: "NT$" },
51
+ { code: "SGD", name: "Singapore Dollar", symbol: "S$" },
52
+ { code: "NZD", name: "New Zealand Dollar", symbol: "NZ$" },
53
+ { code: "BRL", name: "Brazilian Real", symbol: "R$" },
54
+ { code: "MXN", name: "Mexican Peso", symbol: "Mex$" },
55
+ { code: "AED", name: "UAE Dirham", symbol: "د.إ" },
56
+ { code: "SAR", name: "Saudi Riyal", symbol: "﷼" },
57
+ { code: "RUB", name: "Russian Ruble", symbol: "₽" },
58
+ { code: "UAH", name: "Ukrainian Hryvnia", symbol: "₴" },
59
+ { code: "TRY", name: "Turkish Lira", symbol: "₺" },
60
+ { code: "ZAR", name: "South African Rand", symbol: "R" },
61
+ { code: "CHF", name: "Swiss Franc", symbol: "CHF" },
62
+ { code: "SEK", name: "Swedish Krona", symbol: "kr" },
63
+ { code: "NOK", name: "Norwegian Krone", symbol: "kr" },
64
+ { code: "DKK", name: "Danish Krone", symbol: "kr" },
65
+ { code: "PLN", name: "Polish Zloty", symbol: "zł" },
66
+ { code: "CZK", name: "Czech Koruna", symbol: "Kč" },
67
+ { code: "HUF", name: "Hungarian Forint", symbol: "Ft" }
68
+ ];
69
+
70
+ export const APPLE_PAY_SUPPORTED_NETWORKS = [
71
+ { code: "amex", name: "American Express" },
72
+ { code: "discover", name: "Discover" },
73
+ { code: "masterCard", name: "Mastercard" },
74
+ { code: "visa", name: "Visa" },
75
+ { code: "maestro", name: "Maestro" },
76
+ { code: "girocard", name: "Girocard" },
77
+ { code: "cartesBancaires", name: "Cartes Bancaires" },
78
+ { code: "chinaUnionPay", name: "China UnionPay" },
79
+ { code: "jcb", name: "JCB" },
80
+ { code: "interac", name: "Interac" },
81
+ { code: "privateLabel", name: "Private Label" }
82
+ ];
83
+
84
+ export const APPLE_PAY_MERCHANT_CAPABILITIES = [
85
+ { code: "supports3DS", name: "3D Secure", description: "Required for most payment methods" },
86
+ { code: "supportsCredit", name: "Credit Cards", description: "Support credit card payments" },
87
+ { code: "supportsDebit", name: "Debit Cards", description: "Support debit card payments" }
88
+ ];
89
+
90
+ export const COUNTRY_CURRENCY_RESTRICTIONS = {
91
+ US: ["USD"],
92
+ GB: ["GBP", "EUR"],
93
+ CA: ["CAD", "USD"],
94
+ AU: ["AUD"],
95
+ DE: ["EUR"],
96
+ FR: ["EUR"],
97
+ IT: ["EUR"],
98
+ ES: ["EUR"],
99
+ JP: ["JPY"],
100
+ CN: ["CNY"],
101
+ HK: ["HKD"],
102
+ TW: ["TWD"],
103
+ SG: ["SGD"],
104
+ NZ: ["NZD"],
105
+ BR: ["BRL"],
106
+ MX: ["MXN"],
107
+ AE: ["AED"],
108
+ SA: ["SAR"],
109
+ RU: ["RUB", "USD", "EUR"],
110
+ UA: ["UAH", "USD", "EUR"],
111
+ TR: ["TRY", "USD", "EUR"],
112
+ ZA: ["ZAR"]
113
+ };
114
+
115
+ export const getSupportedCurrenciesForCountry = (countryCode) => {
116
+ const restrictions = COUNTRY_CURRENCY_RESTRICTIONS[countryCode];
117
+ if (restrictions) {
118
+ return APPLE_PAY_SUPPORTED_CURRENCIES.filter(currency =>
119
+ restrictions.includes(currency.code)
120
+ );
121
+ }
122
+ return APPLE_PAY_SUPPORTED_CURRENCIES;
123
+ };
124
+
125
+ export const getSupportedNetworksForCountry = (countryCode) => {
126
+ const countryNetworks = {
127
+ US: ["amex", "discover", "masterCard", "visa"],
128
+ GB: ["amex", "masterCard", "visa", "maestro"],
129
+ DE: ["masterCard", "visa", "girocard", "maestro"],
130
+ FR: ["masterCard", "visa", "cartesBancaires"],
131
+ CN: ["chinaUnionPay", "visa", "masterCard"],
132
+ JP: ["jcb", "visa", "masterCard", "amex"],
133
+ CA: ["visa", "masterCard", "amex", "interac"],
134
+ AU: ["visa", "masterCard", "amex"],
135
+ // Default networks for other countries
136
+ default: ["visa", "masterCard", "amex"]
137
+ };
138
+
139
+ return countryNetworks[countryCode] || countryNetworks.default;
140
+ };
141
+
142
+ export const APPLE_PAY_TEST_DATA = {
143
+ testCards: {
144
+ visa: "4111111111111111",
145
+ mastercard: "5555555555554444",
146
+ amex: "378282246310005",
147
+ discover: "6011111111111117"
148
+ },
149
+ testMerchantIdentifier: "merchant.com.payone.test",
150
+ testDomain: "test.payone.com"
151
+ };
152
+
153
+ export const APPLE_PAY_BUTTON_STYLES = [
154
+ { code: "black", name: "Black" },
155
+ { code: "white", name: "White with outline" },
156
+ { code: "white-outline", name: "White" }
157
+ ];
158
+
159
+ export const APPLE_PAY_BUTTON_TYPES = [
160
+ { code: "plain", name: "Plain" },
161
+ { code: "buy", name: "Buy" },
162
+ { code: "donate", name: "Donate" },
163
+ { code: "check-out", name: "Check Out" },
164
+ { code: "book", name: "Book" },
165
+ { code: "subscribe", name: "Subscribe" },
166
+ { code: "reload", name: "Reload" },
167
+ { code: "add-money", name: "Add Money" },
168
+ { code: "top-up", name: "Top Up" },
169
+ { code: "order", name: "Order" },
170
+ { code: "rent", name: "Rent" },
171
+ { code: "support", name: "Support" },
172
+ { code: "contribute", name: "Contribute" },
173
+ { code: "tip", name: "Tip" },
174
+ { code: "continue", name: "Continue" },
175
+ { code: "pay", name: "Pay" },
176
+ { code: "set-up", name: "Set Up" }
177
+ ];
178
+
179
+ export const DEFAULT_APPLE_PAY_CONFIG = {
180
+ countryCode: "DE",
181
+ currencyCode: "EUR",
182
+ merchantCapabilities: ["supports3DS"],
183
+ supportedNetworks: ["visa", "masterCard", "girocard"],
184
+ buttonStyle: "black",
185
+ buttonType: "pay",
186
+ requestPayerName: false,
187
+ requestBillingAddress: false,
188
+ requestPayerEmail: false,
189
+ requestPayerPhone: false,
190
+ requestShipping: false,
191
+ shippingType: "shipping"
192
+ };
193
+
194
+
195
+
196
+
@@ -1,16 +1,16 @@
1
- export const formatTransactionData = (data) => {
2
- const formattedData = [];
3
- if (!data || typeof data !== "object") return formattedData;
4
-
5
- for (const [key, value] of Object.entries(data)) {
6
- if (value !== null && value !== undefined) {
7
- formattedData.push({
8
- key:
9
- key.charAt(0).toUpperCase() + key.slice(1).replace(/([A-Z])/g, " $1"),
10
- value: typeof value === "object" ? JSON.stringify(value) : String(value)
11
- });
12
- }
13
- }
14
-
15
- return formattedData;
1
+ export const formatTransactionData = (data) => {
2
+ const formattedData = [];
3
+ if (!data || typeof data !== "object") return formattedData;
4
+
5
+ for (const [key, value] of Object.entries(data)) {
6
+ if (value !== null && value !== undefined) {
7
+ formattedData.push({
8
+ key:
9
+ key.charAt(0).toUpperCase() + key.slice(1).replace(/([A-Z])/g, " $1"),
10
+ value: typeof value === "object" ? JSON.stringify(value) : String(value)
11
+ });
12
+ }
13
+ }
14
+
15
+ return formattedData;
16
16
  };