@justifi/webcomponents 6.0.0-rc.19 → 6.0.0-rc.20

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 (86) hide show
  1. package/dist/cjs/{check-pkg-version-CZry3Gab.js → check-pkg-version-DS_8EVX4.js} +1 -1
  2. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  3. package/dist/cjs/justifi-apple-pay.cjs.entry.js +116 -6
  4. package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +2 -2
  5. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  6. package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
  7. package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +2 -2
  8. package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
  9. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
  10. package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
  11. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
  12. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  13. package/dist/cjs/justifi-order-terminals.cjs.entry.js +2 -2
  14. package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
  15. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  16. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +2 -2
  17. package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
  18. package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
  19. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +2 -2
  20. package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
  21. package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
  22. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
  23. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +2 -2
  24. package/dist/cjs/justifi-terminals-list.cjs.entry.js +2 -2
  25. package/dist/cjs/{package-DpTrT68q.js → package-XG0rW7xm.js} +1 -1
  26. package/dist/collection/api/services/apple-pay.service.js +80 -2
  27. package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +36 -4
  28. package/dist/docs.json +1 -1
  29. package/dist/esm/{check-pkg-version-BzAwEptg.js → check-pkg-version-DhRpS7Qc.js} +1 -1
  30. package/dist/esm/hidden-input_2.entry.js +1 -1
  31. package/dist/esm/justifi-apple-pay.entry.js +116 -6
  32. package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +2 -2
  33. package/dist/esm/justifi-business-details.entry.js +2 -2
  34. package/dist/esm/justifi-business-form.entry.js +2 -2
  35. package/dist/esm/justifi-checkout-summary_7.entry.js +2 -2
  36. package/dist/esm/justifi-checkout.entry.js +2 -2
  37. package/dist/esm/justifi-checkouts-list.entry.js +2 -2
  38. package/dist/esm/justifi-dispute-management.entry.js +2 -2
  39. package/dist/esm/justifi-dispute-notification_3.entry.js +2 -2
  40. package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
  41. package/dist/esm/justifi-order-terminals.entry.js +2 -2
  42. package/dist/esm/justifi-payment-details.entry.js +2 -2
  43. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  44. package/dist/esm/justifi-payment-transactions-list.entry.js +2 -2
  45. package/dist/esm/justifi-payments-list.entry.js +2 -2
  46. package/dist/esm/justifi-payout-details.entry.js +2 -2
  47. package/dist/esm/justifi-payout-transactions-list.entry.js +2 -2
  48. package/dist/esm/justifi-payouts-list.entry.js +2 -2
  49. package/dist/esm/justifi-refund-payment.entry.js +2 -2
  50. package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -2
  51. package/dist/esm/justifi-terminal-orders-list.entry.js +2 -2
  52. package/dist/esm/justifi-terminals-list.entry.js +2 -2
  53. package/dist/esm/{package-CbHGNIID.js → package-BF0mIfcQ.js} +1 -1
  54. package/dist/module/justifi-apple-pay.js +116 -6
  55. package/dist/module/package.js +1 -1
  56. package/dist/webcomponents/{p-1c8c3381.entry.js → p-12175e07.entry.js} +1 -1
  57. package/dist/webcomponents/{p-237c1c0b.entry.js → p-20733148.entry.js} +1 -1
  58. package/dist/webcomponents/{p-8b34e550.entry.js → p-319b4126.entry.js} +1 -1
  59. package/dist/webcomponents/{p-e5db299f.entry.js → p-53739e78.entry.js} +1 -1
  60. package/dist/webcomponents/p-58c766c8.entry.js +1 -0
  61. package/dist/webcomponents/{p-5da2d93a.entry.js → p-62a4a2c2.entry.js} +1 -1
  62. package/dist/webcomponents/{p-a5011c78.entry.js → p-664501b7.entry.js} +1 -1
  63. package/dist/webcomponents/{p-719e2cf9.entry.js → p-6c7f08c8.entry.js} +1 -1
  64. package/dist/webcomponents/{p-92bb3f7d.entry.js → p-6cf48f04.entry.js} +1 -1
  65. package/dist/webcomponents/{p-0b5d6f75.entry.js → p-7922acee.entry.js} +1 -1
  66. package/dist/webcomponents/{p-8252f34e.entry.js → p-8e0228df.entry.js} +1 -1
  67. package/dist/webcomponents/{p-ea781366.entry.js → p-927ecf5d.entry.js} +1 -1
  68. package/dist/webcomponents/{p-fd6d55e9.entry.js → p-95a3e104.entry.js} +1 -1
  69. package/dist/webcomponents/{p-c3a768f2.entry.js → p-95e33bcc.entry.js} +1 -1
  70. package/dist/webcomponents/{p-cec23474.entry.js → p-988ae9e9.entry.js} +1 -1
  71. package/dist/webcomponents/{p-c50cfde3.entry.js → p-9c1d5a55.entry.js} +1 -1
  72. package/dist/webcomponents/{p-323d2109.entry.js → p-9ed62efb.entry.js} +1 -1
  73. package/dist/webcomponents/p-BF0mIfcQ.js +1 -0
  74. package/dist/webcomponents/{p-z8xlfetB.js → p-VSSGd2zP.js} +1 -1
  75. package/dist/webcomponents/p-a54281e8.entry.js +1 -0
  76. package/dist/webcomponents/{p-d692a782.entry.js → p-d8f9f287.entry.js} +1 -1
  77. package/dist/webcomponents/{p-346148d1.entry.js → p-d9d371e1.entry.js} +1 -1
  78. package/dist/webcomponents/p-ed53b213.entry.js +1 -0
  79. package/dist/webcomponents/{p-9149e6d8.entry.js → p-fa31c907.entry.js} +1 -1
  80. package/dist/webcomponents/{p-eb5e4a05.entry.js → p-ff685149.entry.js} +1 -1
  81. package/dist/webcomponents/webcomponents.esm.js +1 -1
  82. package/package.json +1 -1
  83. package/dist/webcomponents/p-36329825.entry.js +0 -1
  84. package/dist/webcomponents/p-476c43ef.entry.js +0 -1
  85. package/dist/webcomponents/p-7fcc31f6.entry.js +0 -1
  86. package/dist/webcomponents/p-CbHGNIID.js +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-C9hBD-32.js');
4
4
  var ComponentError = require('./ComponentError-D4OLnOkg.js');
5
- var checkPkgVersion = require('./check-pkg-version-CZry3Gab.js');
5
+ var checkPkgVersion = require('./check-pkg-version-DS_8EVX4.js');
6
6
  var payout_service = require('./payout.service-6Cl_yXXQ.js');
7
7
  require('./config-state-BBOZIS8x.js');
8
8
  require('./dinero-BwNN_k7x.js');
@@ -16,7 +16,7 @@ var getSubaccounts = require('./get-subaccounts-Bnfv2tEN.js');
16
16
  var styledHost = require('./styled-host-BfVJlAsJ.js');
17
17
  require('./event-types-YOY5TKUN.js');
18
18
  var payoutsTable = require('./payouts-table-BbydhJUr.js');
19
- require('./package-DpTrT68q.js');
19
+ require('./package-XG0rW7xm.js');
20
20
  require('./Api-DyimBzKT.js');
21
21
  require('./utils-ChCUZgUy.js');
22
22
  require('./index-B32W0A3m.js');
@@ -14,7 +14,7 @@ var styledHost = require('./styled-host-BfVJlAsJ.js');
14
14
  require('./event-types-YOY5TKUN.js');
15
15
  var payment_service = require('./payment.service-aR96UW5e.js');
16
16
  var getPaymentDetails = require('./get-payment-details-BfgRmNL4.js');
17
- var checkPkgVersion = require('./check-pkg-version-CZry3Gab.js');
17
+ var checkPkgVersion = require('./check-pkg-version-DS_8EVX4.js');
18
18
  var utils$1 = require('./utils-DvUQQLmR.js');
19
19
  var Api = require('./Api-DyimBzKT.js');
20
20
  var skeleton = require('./skeleton-C7DQRD6r.js');
@@ -24,7 +24,7 @@ require('./index-B32W0A3m.js');
24
24
  require('./helpers-B5OCqlIM.js');
25
25
  require('./state-options-CIT9xdTz.js');
26
26
  require('./parts-9jMf1erK.js');
27
- require('./package-DpTrT68q.js');
27
+ require('./package-XG0rW7xm.js');
28
28
 
29
29
  const amountValidation = (maxAmount) => {
30
30
  const max = +maxAmount;
@@ -8,7 +8,7 @@ require('./Pagination-Dediz133.js');
8
8
  require('./Business-DCRzZf0w.js');
9
9
  require('./Dispute-CruQTF6_.js');
10
10
  var utils = require('./utils-DvUQQLmR.js');
11
- var checkPkgVersion = require('./check-pkg-version-CZry3Gab.js');
11
+ var checkPkgVersion = require('./check-pkg-version-DS_8EVX4.js');
12
12
  var checkout_store = require('./checkout.store-DJEc-So8.js');
13
13
  var utils$1 = require('./utils-ChCUZgUy.js');
14
14
  var insuranceState = require('./insurance-state-d2thhXUX.js');
@@ -20,7 +20,7 @@ require('./config-state-BBOZIS8x.js');
20
20
  require('./index-B32W0A3m.js');
21
21
  require('./helpers-B5OCqlIM.js');
22
22
  require('./state-options-CIT9xdTz.js');
23
- require('./package-DpTrT68q.js');
23
+ require('./package-XG0rW7xm.js');
24
24
  require('./dinero-BwNN_k7x.js');
25
25
  require('./index-D-dD-aC2.js');
26
26
 
@@ -3,7 +3,7 @@
3
3
  var index = require('./index-C9hBD-32.js');
4
4
  var styledHost = require('./styled-host-BfVJlAsJ.js');
5
5
  require('./event-types-YOY5TKUN.js');
6
- var checkPkgVersion = require('./check-pkg-version-CZry3Gab.js');
6
+ var checkPkgVersion = require('./check-pkg-version-DS_8EVX4.js');
7
7
  var terminalOrdersTable = require('./terminal-orders-table-B4HjERrK.js');
8
8
  require('./config-state-BBOZIS8x.js');
9
9
  require('./dinero-BwNN_k7x.js');
@@ -14,7 +14,7 @@ require('./Business-DCRzZf0w.js');
14
14
  require('./Dispute-CruQTF6_.js');
15
15
  var utils = require('./utils-DvUQQLmR.js');
16
16
  var Api = require('./Api-DyimBzKT.js');
17
- require('./package-DpTrT68q.js');
17
+ require('./package-XG0rW7xm.js');
18
18
  require('./parts-9jMf1erK.js');
19
19
  require('./utils-ChCUZgUy.js');
20
20
  require('./badge-CcJ9H85-.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-C9hBD-32.js');
4
4
  var ComponentError = require('./ComponentError-D4OLnOkg.js');
5
- var checkPkgVersion = require('./check-pkg-version-CZry3Gab.js');
5
+ var checkPkgVersion = require('./check-pkg-version-DS_8EVX4.js');
6
6
  var terminal_service = require('./terminal.service-D1FAYZzd.js');
7
7
  require('./config-state-BBOZIS8x.js');
8
8
  require('./dinero-BwNN_k7x.js');
@@ -15,7 +15,7 @@ var getSubaccounts = require('./get-subaccounts-Bnfv2tEN.js');
15
15
  var styledHost = require('./styled-host-BfVJlAsJ.js');
16
16
  require('./event-types-YOY5TKUN.js');
17
17
  var terminalsTable = require('./terminals-table-C79Xc4FI.js');
18
- require('./package-DpTrT68q.js');
18
+ require('./package-XG0rW7xm.js');
19
19
  require('./Api-DyimBzKT.js');
20
20
  require('./utils-ChCUZgUy.js');
21
21
  require('./index-B32W0A3m.js');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const name = "@justifi/webcomponents";
4
- const version = "6.0.0-rc.19";
4
+ const version = "6.0.0-rc.20";
5
5
  var packageJson = {
6
6
  name: name,
7
7
  version: version};
@@ -70,24 +70,66 @@ export class ApplePayService {
70
70
  * Start Apple Pay session
71
71
  */
72
72
  async startPaymentSession(paymentRequest, authToken, accountId) {
73
+ // Begin verbose diagnostics for easier debugging in the field
74
+ console.groupCollapsed('[ApplePayService] startPaymentSession called');
75
+ console.log('[ApplePayService] raw paymentRequest:', JSON.stringify(paymentRequest, null, 2));
76
+ console.log('[ApplePayService] has authToken:', Boolean(authToken));
77
+ console.log('[ApplePayService] accountId:', accountId);
78
+ console.log('[ApplePayService] has config:', Boolean(this.applePayConfig));
73
79
  if (!this.applePayConfig) {
80
+ console.error('[ApplePayService] Missing applePayConfig. Did you call initialize()?');
81
+ console.groupEnd();
74
82
  throw new Error('Apple Pay not initialized. Call initialize() first.');
75
83
  }
76
84
  // if (!this.isAvailable()) {
77
85
  // throw new Error('Apple Pay is not available on this device/browser');
78
86
  // }
79
87
  const request = new ApplePayPaymentRequest(paymentRequest);
88
+ console.log('[ApplePayService] created ApplePayPaymentRequest:', request);
80
89
  if (!request.isValid) {
90
+ const missingFields = [];
91
+ if (!request.countryCode)
92
+ missingFields.push('countryCode');
93
+ if (!request.currencyCode)
94
+ missingFields.push('currencyCode');
95
+ if (!request.merchantCapabilities ||
96
+ request.merchantCapabilities.length === 0)
97
+ missingFields.push('merchantCapabilities');
98
+ if (!request.supportedNetworks || request.supportedNetworks.length === 0)
99
+ missingFields.push('supportedNetworks');
100
+ if (!request.total || !request.total.label || !request.total.amount)
101
+ missingFields.push('total');
102
+ console.error('[ApplePayService] Payment request is invalid. Missing/invalid:', missingFields);
103
+ console.groupEnd();
81
104
  throw new Error('Invalid payment request provided');
82
105
  }
83
106
  this.currentPaymentRequest = request;
84
107
  return new Promise((resolve, reject) => {
85
108
  try {
109
+ console.log('[ApplePayService] About to instantiate ApplePaySession');
110
+ // Defensive checks for Apple Pay environment
111
+ if (typeof window === 'undefined' || !('ApplePaySession' in window)) {
112
+ console.error('[ApplePayService] ApplePaySession not available on window');
113
+ console.groupEnd();
114
+ return reject({
115
+ success: false,
116
+ error: {
117
+ code: 'APPLE_PAY_UNAVAILABLE',
118
+ message: 'ApplePaySession API is not available in this environment',
119
+ },
120
+ });
121
+ }
86
122
  this.currentSession = new window.ApplePaySession(3, request);
123
+ console.log('[ApplePayService] ApplePaySession instantiated:', this.currentSession);
87
124
  this.setupSessionEventHandlers(resolve, reject, authToken, accountId);
125
+ console.log('[ApplePayService] Event handlers set. Beginning session...');
88
126
  this.currentSession.begin();
127
+ console.log('[ApplePayService] Session.begin() called');
128
+ console.groupEnd();
89
129
  }
90
130
  catch (error) {
131
+ console.error('[ApplePayService] Exception while starting session:', error);
132
+ console.groupEnd();
91
133
  reject({
92
134
  success: false,
93
135
  error: {
@@ -117,16 +159,26 @@ export class ApplePayService {
117
159
  if (!this.currentSession ||
118
160
  !this.applePayConfig ||
119
161
  !this.currentPaymentRequest) {
162
+ console.error('[ApplePayService] setupSessionEventHandlers called without required state', {
163
+ hasSession: Boolean(this.currentSession),
164
+ hasConfig: Boolean(this.applePayConfig),
165
+ hasPaymentRequest: Boolean(this.currentPaymentRequest),
166
+ });
120
167
  return;
121
168
  }
122
169
  this.currentSession.onvalidatemerchant = async () => {
170
+ console.groupCollapsed('[ApplePayService] onvalidatemerchant');
123
171
  try {
172
+ console.log('[ApplePayService] accountId:', accountId);
124
173
  if (!authToken) {
174
+ console.error('[ApplePayService] Missing authToken for merchant validation');
125
175
  throw new Error('Authentication token not provided.');
126
176
  }
127
177
  const merchantSession = await this.validateMerchant(authToken, accountId);
178
+ console.log('[ApplePayService] merchantSession received');
128
179
  try {
129
180
  this.currentSession.completeMerchantValidation(merchantSession);
181
+ console.log('[ApplePayService] completeMerchantValidation called');
130
182
  }
131
183
  catch (completionError) {
132
184
  console.error('Error calling completeMerchantValidation:', completionError);
@@ -136,7 +188,9 @@ export class ApplePayService {
136
188
  catch (error) {
137
189
  console.error('=== MERCHANT VALIDATION ERROR ===');
138
190
  console.error('Error during merchant validation:', error);
139
- console.error('Error stack:', error.stack);
191
+ if (error && error.stack) {
192
+ console.error('Error stack:', error.stack);
193
+ }
140
194
  this.currentSession.abort();
141
195
  reject({
142
196
  success: false,
@@ -148,20 +202,30 @@ export class ApplePayService {
148
202
  },
149
203
  });
150
204
  }
205
+ console.groupEnd();
151
206
  };
152
207
  this.currentSession.onpaymentauthorized = async (event) => {
208
+ var _a;
209
+ console.groupCollapsed('[ApplePayService] onpaymentauthorized');
153
210
  try {
154
211
  const payment = event.payment;
212
+ console.log('[ApplePayService] payment payload snapshot:', {
213
+ hasToken: Boolean(payment === null || payment === void 0 ? void 0 : payment.token),
214
+ tokenType: ((_a = payment === null || payment === void 0 ? void 0 : payment.token) === null || _a === void 0 ? void 0 : _a.paymentData) ? 'paymentData' : 'raw',
215
+ });
155
216
  const paymentPayload = Object.assign(Object.assign({}, payment.token), { product_details: {
156
217
  name: this.currentPaymentRequest.total.label,
157
218
  price: ApplePayHelpers.parseAmount(this.currentPaymentRequest.total.amount),
158
219
  description: this.currentPaymentRequest.total.label,
159
220
  } });
221
+ console.log('[ApplePayService] paymentPayload prepared');
160
222
  const paymentResult = await this.processPayment(authToken, accountId, paymentPayload);
223
+ console.log('[ApplePayService] processPayment result:', paymentResult);
161
224
  if (paymentResult.success) {
162
225
  this.currentSession.completePayment({
163
226
  status: ApplePaySessionStatus.STATUS_SUCCESS,
164
227
  });
228
+ console.log('[ApplePayService] Payment success; resolving');
165
229
  resolve({
166
230
  success: true,
167
231
  token: payment.token,
@@ -185,7 +249,9 @@ export class ApplePayService {
185
249
  catch (error) {
186
250
  console.error('=== PAYMENT PROCESSING ERROR ===');
187
251
  console.error('Error processing payment:', error);
188
- console.error('Error stack:', error.stack);
252
+ if (error && error.stack) {
253
+ console.error('Error stack:', error.stack);
254
+ }
189
255
  this.currentSession.completePayment({
190
256
  status: ApplePaySessionStatus.STATUS_FAILURE,
191
257
  });
@@ -200,31 +266,40 @@ export class ApplePayService {
200
266
  });
201
267
  }
202
268
  finally {
269
+ console.log('[ApplePayService] Cleaning up session state');
203
270
  this.currentSession = undefined;
204
271
  this.currentPaymentRequest = undefined;
205
272
  }
273
+ console.groupEnd();
206
274
  };
207
275
  this.currentSession.onpaymentmethodselected = () => {
276
+ console.groupCollapsed('[ApplePayService] onpaymentmethodselected');
208
277
  const paymentUpdate = {
209
278
  newTotal: this.currentPaymentRequest.total,
210
279
  newLineItems: this.currentPaymentRequest.lineItems || [],
211
280
  };
212
281
  try {
213
282
  this.currentSession.completePaymentMethodSelection(paymentUpdate);
283
+ console.log('[ApplePayService] completePaymentMethodSelection called');
214
284
  }
215
285
  catch (error) {
216
286
  console.error('Error completing payment method selection:', error);
217
287
  this.currentSession.abort();
218
288
  }
289
+ console.groupEnd();
219
290
  };
220
291
  this.currentSession.onshippingmethodselected = () => {
292
+ console.groupCollapsed('[ApplePayService] onshippingmethodselected');
221
293
  this.currentSession.completeShippingMethodSelection({
222
294
  status: ApplePaySessionStatus.STATUS_SUCCESS,
223
295
  newTotal: this.currentPaymentRequest.total,
224
296
  newLineItems: this.currentPaymentRequest.lineItems || [],
225
297
  });
298
+ console.log('[ApplePayService] completeShippingMethodSelection called');
299
+ console.groupEnd();
226
300
  };
227
301
  this.currentSession.oncancel = (event) => {
302
+ console.groupCollapsed('[ApplePayService] oncancel');
228
303
  if (event.sessionError) {
229
304
  console.error(event.sessionError);
230
305
  switch (event.sessionError.code) {
@@ -255,9 +330,11 @@ export class ApplePayService {
255
330
  message: 'User cancelled the Apple Pay session',
256
331
  },
257
332
  });
333
+ console.groupEnd();
258
334
  };
259
335
  if ('onerror' in this.currentSession) {
260
336
  this.currentSession.onerror = (error) => {
337
+ console.groupCollapsed('[ApplePayService] onerror');
261
338
  console.error('=== APPLE PAY SESSION ERROR ===');
262
339
  console.error('Session error:', error);
263
340
  this.currentSession = undefined;
@@ -269,6 +346,7 @@ export class ApplePayService {
269
346
  message: 'Apple Pay session error occurred',
270
347
  },
271
348
  });
349
+ console.groupEnd();
272
350
  };
273
351
  }
274
352
  }
@@ -30,6 +30,14 @@ export class ApplePay {
30
30
  this.isProcessing = true;
31
31
  this.error = null;
32
32
  this.applePayStarted.emit();
33
+ console.groupCollapsed('[ApplePay Component] handleApplePayClick');
34
+ console.log('[ApplePay Component] click context:', {
35
+ isProcessing: this.isProcessing,
36
+ disabled: this.disabled,
37
+ isAvailable: this.isAvailable,
38
+ canMakePayments: this.canMakePayments,
39
+ hasService: Boolean(this.applePayService),
40
+ });
33
41
  const paymentRequest = {
34
42
  countryCode: this.countryCode,
35
43
  currencyCode: checkoutStore.paymentCurrency,
@@ -37,9 +45,13 @@ export class ApplePay {
37
45
  supportedNetworks: ApplePayHelpers.getDefaultSupportedNetworks(),
38
46
  total: ApplePayHelpers.createLineItem(checkoutStore.paymentDescription, checkoutStore.paymentAmount),
39
47
  };
40
- console.log("paymentRequest", paymentRequest);
48
+ console.log("[ApplePay Component] paymentRequest", paymentRequest);
49
+ console.log('[ApplePay Component] identifiers snapshot:', {
50
+ authTokenLength: checkoutStore.authToken ? String(checkoutStore.authToken).length : 0,
51
+ accountId: checkoutStore.accountId,
52
+ });
41
53
  const result = await this.applePayService.startPaymentSession(paymentRequest, checkoutStore.authToken, checkoutStore.accountId);
42
- console.log("result", result);
54
+ console.log("[ApplePay Component] startPaymentSession result", result);
43
55
  if (result.success) {
44
56
  this.applePayCompleted.emit({
45
57
  success: true,
@@ -69,6 +81,7 @@ export class ApplePay {
69
81
  }
70
82
  finally {
71
83
  this.isProcessing = false;
84
+ console.groupEnd();
72
85
  }
73
86
  };
74
87
  }
@@ -77,6 +90,13 @@ export class ApplePay {
77
90
  this.isLoading = true;
78
91
  this.error = null;
79
92
  this.isConfigValid = true;
93
+ console.groupCollapsed('[ApplePay Component] initializeApplePay');
94
+ console.log('[ApplePay Component] checkout state snapshot:', {
95
+ paymentAmount: checkoutStore.paymentAmount,
96
+ paymentCurrency: checkoutStore.paymentCurrency,
97
+ hasAuthToken: Boolean(checkoutStore.authToken),
98
+ accountId: checkoutStore.accountId,
99
+ });
80
100
  const hasRequiredConfig = Boolean(checkoutStore.paymentAmount) &&
81
101
  Boolean(checkoutStore.paymentCurrency) &&
82
102
  Boolean(checkoutStore.authToken);
@@ -87,18 +107,26 @@ export class ApplePay {
87
107
  paymentAmount: checkoutStore.paymentAmount,
88
108
  paymentCurrency: checkoutStore.paymentCurrency,
89
109
  hasAuthToken: Boolean(checkoutStore.authToken),
110
+ accountId: checkoutStore.accountId,
90
111
  });
91
112
  this.applePayError.emit({ error: this.error });
92
113
  this.isLoading = false;
114
+ console.groupEnd();
93
115
  return;
94
116
  }
95
117
  this.isAvailable = ApplePayHelpers.isApplePaySupported();
96
118
  this.canMakePayments = ApplePayHelpers.canMakePayments();
119
+ console.log('[ApplePay Component] support check:', {
120
+ isAvailable: this.isAvailable,
121
+ canMakePayments: this.canMakePayments,
122
+ hasApplePaySessionOnWindow: typeof window !== 'undefined' && 'ApplePaySession' in window,
123
+ });
97
124
  if (!this.isAvailable) {
98
125
  this.error = "Apple Pay is not supported on this device";
99
126
  console.error(this.error);
100
127
  this.applePayError.emit({ error: this.error });
101
128
  this.isLoading = false;
129
+ console.groupEnd();
102
130
  return;
103
131
  }
104
132
  if (!this.canMakePayments) {
@@ -106,6 +134,7 @@ export class ApplePay {
106
134
  console.error(this.error);
107
135
  this.applePayError.emit({ error: this.error });
108
136
  this.isLoading = false;
137
+ console.groupEnd();
109
138
  return;
110
139
  }
111
140
  const applePayConfig = {
@@ -116,6 +145,7 @@ export class ApplePay {
116
145
  buttonType: this.buttonType,
117
146
  buttonStyle: this.buttonStyle,
118
147
  };
148
+ console.log('[ApplePay Component] initializing service with config:', applePayConfig);
119
149
  this.applePayService = new ApplePayService();
120
150
  this.applePayService.initialize(applePayConfig);
121
151
  const hasActiveCard = await this.applePayService.canMakePaymentsWithActiveCard();
@@ -133,6 +163,7 @@ export class ApplePay {
133
163
  }
134
164
  finally {
135
165
  this.isLoading = false;
166
+ console.groupEnd();
136
167
  }
137
168
  }
138
169
  async isSupported() {
@@ -154,9 +185,10 @@ export class ApplePay {
154
185
  this.isAvailable &&
155
186
  this.canMakePayments &&
156
187
  this.isConfigValid;
157
- return (h(StyledHost, { key: '941aea129425ddb64b7befc46f06d9f987e22282' }, checkoutStore.checkoutLoaded && (h("script", { key: '63562ab394410712d3265dda1ef16140a4fdbc3c', async: true, src: 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js', onLoad: () => {
188
+ return (h(StyledHost, { key: 'a50061a2a487a9cddb9e9296ca508cd632cdf832' }, checkoutStore.checkoutLoaded && (h("script", { key: 'eb9a9479294c125b0db7bccd5e90c99ea9e03bbf', async: true, src: 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js', onLoad: () => {
189
+ console.log('[ApplePay Component] Apple Pay SDK script loaded');
158
190
  this.initializeApplePay();
159
- } })), h("div", { key: '10ac5de54e3fe73457101f2652bf9cea2c90d2b2', class: 'apple-pay-container' }, h(ApplePaySkeleton, { key: '6b8976a34d8a1db9d87da2a02ae47d1d8f0b733d', isReady: isReady }), isReady && (h(ApplePayButton, { key: 'c1c84b958888e2ca82ad44d006c5c53ba947412a', buttonType: this.buttonType, buttonStyle: this.buttonStyle, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleApplePayClick }))), h("style", { key: 'b98fa0f38d95c0dbb33a7b0f342eb70957355125' }, `
191
+ } })), h("div", { key: '901b1f84625bb6c5652612f364312250f7ebb779', class: 'apple-pay-container' }, h(ApplePaySkeleton, { key: '87b38d500738e1cdb1bb166f02e29845de30eae1', isReady: isReady }), isReady && (h(ApplePayButton, { key: '18fa731162b597740ee6b15b7737668efed9c162', buttonType: this.buttonType, buttonStyle: this.buttonStyle, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleApplePayClick }))), h("style", { key: '9d71379ac48b89babae91012ea22de91f4fb1b58' }, `
160
192
  .apple-pay-container {
161
193
  width: 100%;
162
194
  }
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-09-03T13:30:39",
2
+ "timestamp": "2025-09-03T13:54:51",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.36.3",
@@ -1,4 +1,4 @@
1
- import { p as packageJson } from './package-CbHGNIID.js';
1
+ import { p as packageJson } from './package-BF0mIfcQ.js';
2
2
  import { A as Api } from './Api-DAWuvzbl.js';
3
3
  import './ComponentError-Cjcsf8ku.js';
4
4
  import './Refund-CVh70dXA.js';
@@ -3,7 +3,7 @@ import { c as createStore } from './index-B_KxSZIF.js';
3
3
  import { i as inputInvalidAndFocused, b as inputInvalid, a as inputFocused, c as input, l as label } from './parts-RvUQ__Pq.js';
4
4
  import { g as getDefaultExportFromCjs } from './_commonjsHelpers-BFTU3MAI.js';
5
5
  import { F as FormControlErrorText } from './form-control-error-text-R7U07nTg.js';
6
- import { p as packageJson } from './package-CbHGNIID.js';
6
+ import { p as packageJson } from './package-BF0mIfcQ.js';
7
7
 
8
8
  const iframeInputStylesStore = createStore({
9
9
  focused: {