@justifi/webcomponents 6.5.1-rc.1 → 6.5.1-rc.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 (157) hide show
  1. package/dist/cjs/{GooglePay-HXBAmTgL.js → GooglePay-40aEKdDF.js} +40 -9
  2. package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +1 -1
  3. package/dist/cjs/{business.service-DMzf08nC.js → business.service-BggHdPOV.js} +1 -1
  4. package/dist/cjs/{check-pkg-version-DNFRhNcW.js → check-pkg-version-DuPkU5qI.js} +2 -2
  5. package/dist/cjs/{checkout.service-CHNHEsrp.js → checkout.service-BUcIs9az.js} +1 -1
  6. package/dist/cjs/checkouts-list-core.cjs.entry.js +1 -1
  7. package/dist/cjs/{dispute.service-B63kcFkU.js → dispute.service-CxWqivLc.js} +1 -1
  8. package/dist/cjs/{get-payment-details-BN139jp0.js → get-payment-details-D_dDxsPG.js} +1 -1
  9. package/dist/cjs/{get-subaccounts-IgHJX5J4.js → get-subaccounts-_D9lzD5O.js} +1 -1
  10. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  11. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +3 -3
  12. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +1 -1
  13. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +2 -2
  14. package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +242 -21
  15. package/dist/cjs/justifi-business-details.cjs.entry.js +4 -4
  16. package/dist/cjs/justifi-business-form.cjs.entry.js +4 -4
  17. package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
  18. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
  19. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +5 -5
  20. package/dist/cjs/justifi-dispute-management.cjs.entry.js +4 -4
  21. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +4 -4
  22. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
  23. package/dist/cjs/justifi-order-terminals.cjs.entry.js +5 -5
  24. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -2
  25. package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -5
  26. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -4
  27. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +4 -4
  28. package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -4
  29. package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -4
  30. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +4 -4
  31. package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -5
  32. package/dist/cjs/justifi-refund-payment.cjs.entry.js +5 -5
  33. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
  34. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +1 -1
  35. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +4 -4
  36. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
  37. package/dist/cjs/justifi-terminals-list.cjs.entry.js +5 -5
  38. package/dist/cjs/{package-Z2EW-l1q.js → package-C6nOTkVV.js} +1 -1
  39. package/dist/cjs/payment-details-core.cjs.entry.js +1 -1
  40. package/dist/cjs/{payment.service-eOZc1Qay.js → payment.service-wWZTmyFv.js} +1 -1
  41. package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
  42. package/dist/cjs/{payout.service-QVl5N-UV.js → payout.service-CWAem5VG.js} +1 -1
  43. package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
  44. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +2 -2
  45. package/dist/cjs/{terminal-orders-table-g2fwrh2P.js → terminal-orders-table-DBNG4K5I.js} +1 -1
  46. package/dist/cjs/{terminal.service-BuSFyt0j.js → terminal.service-DSlqCGxE.js} +1 -1
  47. package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
  48. package/dist/collection/api/GooglePay.js +40 -9
  49. package/dist/collection/api/services/google-pay.service.js +137 -9
  50. package/dist/collection/components/modular-checkout/sub-components/google-pay.js +100 -3
  51. package/dist/collection/ui-components/google-pay-button.js +1 -5
  52. package/dist/docs.json +1 -1
  53. package/dist/esm/{GooglePay-9bPcqGZ9.js → GooglePay-f7mYX17c.js} +40 -9
  54. package/dist/esm/bank-account-document-form-inputs_6.entry.js +1 -1
  55. package/dist/esm/{business.service-2j91Emgq.js → business.service-CzHfftZk.js} +1 -1
  56. package/dist/esm/{check-pkg-version-B8HjTYV7.js → check-pkg-version-Cqb7EhvC.js} +2 -2
  57. package/dist/esm/{checkout.service-D-dEMyXF.js → checkout.service-BWdnJLVG.js} +1 -1
  58. package/dist/esm/checkouts-list-core.entry.js +1 -1
  59. package/dist/esm/{dispute.service-DPumDIuV.js → dispute.service-CqX5HR5o.js} +1 -1
  60. package/dist/esm/{get-payment-details-CD_K6FQ3.js → get-payment-details-D0T7bd_-.js} +1 -1
  61. package/dist/esm/{get-subaccounts-D1eF6c0B.js → get-subaccounts-Gil-SOoF.js} +1 -1
  62. package/dist/esm/hidden-input_2.entry.js +1 -1
  63. package/dist/esm/internal-tokenize-payment-method_7.entry.js +3 -3
  64. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +1 -1
  65. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -2
  66. package/dist/esm/justifi-apple-pay_8.entry.js +242 -21
  67. package/dist/esm/justifi-business-details.entry.js +4 -4
  68. package/dist/esm/justifi-business-form.entry.js +4 -4
  69. package/dist/esm/justifi-checkout.entry.js +3 -3
  70. package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
  71. package/dist/esm/justifi-checkouts-list.entry.js +5 -5
  72. package/dist/esm/justifi-dispute-management.entry.js +4 -4
  73. package/dist/esm/justifi-dispute-notification_3.entry.js +4 -4
  74. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
  75. package/dist/esm/justifi-order-terminals.entry.js +5 -5
  76. package/dist/esm/justifi-owner-form_3.entry.js +2 -2
  77. package/dist/esm/justifi-payment-details.entry.js +5 -5
  78. package/dist/esm/justifi-payment-provisioning.entry.js +4 -4
  79. package/dist/esm/justifi-payment-transactions-list.entry.js +4 -4
  80. package/dist/esm/justifi-payments-list.entry.js +4 -4
  81. package/dist/esm/justifi-payout-details.entry.js +4 -4
  82. package/dist/esm/justifi-payout-transactions-list.entry.js +4 -4
  83. package/dist/esm/justifi-payouts-list.entry.js +5 -5
  84. package/dist/esm/justifi-refund-payment.entry.js +5 -5
  85. package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
  86. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +1 -1
  87. package/dist/esm/justifi-terminal-orders-list.entry.js +4 -4
  88. package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
  89. package/dist/esm/justifi-terminals-list.entry.js +5 -5
  90. package/dist/esm/{package-BGHeOtXW.js → package-CzedYX3W.js} +1 -1
  91. package/dist/esm/payment-details-core.entry.js +1 -1
  92. package/dist/esm/{payment.service-BreQSu6J.js → payment.service-CWyZF34P.js} +1 -1
  93. package/dist/esm/payments-list-core.entry.js +1 -1
  94. package/dist/esm/{payout.service-DuqRe6oq.js → payout.service-CkTievFG.js} +1 -1
  95. package/dist/esm/payouts-list-core.entry.js +1 -1
  96. package/dist/esm/terminal-orders-list-core.entry.js +2 -2
  97. package/dist/esm/{terminal-orders-table-DSo5x2D7.js → terminal-orders-table-OX3ZvzZy.js} +1 -1
  98. package/dist/esm/{terminal.service-CkzrYIA_.js → terminal.service-Bu5-dhum.js} +1 -1
  99. package/dist/esm/terminals-list-core.entry.js +1 -1
  100. package/dist/module/GooglePay.js +40 -9
  101. package/dist/module/google-pay.js +238 -17
  102. package/dist/module/package.js +1 -1
  103. package/dist/types/api/services/google-pay.service.d.ts +1 -1
  104. package/dist/webcomponents/{p-d2935214.entry.js → p-0437c330.entry.js} +1 -1
  105. package/dist/webcomponents/{p-16812327.entry.js → p-065b24c3.entry.js} +1 -1
  106. package/dist/webcomponents/{p-9a795f44.entry.js → p-14cbf366.entry.js} +1 -1
  107. package/dist/webcomponents/{p-3c006a15.entry.js → p-1e014ee7.entry.js} +1 -1
  108. package/dist/webcomponents/{p-ee122560.entry.js → p-20e66fc0.entry.js} +1 -1
  109. package/dist/webcomponents/{p-13b55ca1.entry.js → p-22fdf7a4.entry.js} +1 -1
  110. package/dist/webcomponents/{p-c16dbe20.entry.js → p-25755af4.entry.js} +1 -1
  111. package/dist/webcomponents/{p-38e1ef4b.entry.js → p-3d3a65ca.entry.js} +1 -1
  112. package/dist/webcomponents/p-3f291e6b.entry.js +1 -0
  113. package/dist/webcomponents/{p-c4044170.entry.js → p-44011a41.entry.js} +1 -1
  114. package/dist/webcomponents/{p-b9d64d6b.entry.js → p-4ccd753b.entry.js} +1 -1
  115. package/dist/webcomponents/{p-0ca05626.entry.js → p-4f16a3ce.entry.js} +1 -1
  116. package/dist/webcomponents/{p-dd0d0f96.entry.js → p-50a32503.entry.js} +1 -1
  117. package/dist/webcomponents/{p-13ee296a.entry.js → p-57ed105e.entry.js} +1 -1
  118. package/dist/webcomponents/{p-b3f8d5d4.entry.js → p-5e3bc1dc.entry.js} +1 -1
  119. package/dist/webcomponents/{p-ea18fcd9.entry.js → p-62cfe9b6.entry.js} +1 -1
  120. package/dist/webcomponents/{p-af55fc0d.entry.js → p-6a075da4.entry.js} +1 -1
  121. package/dist/webcomponents/{p-cee402a5.entry.js → p-88074dd7.entry.js} +1 -1
  122. package/dist/webcomponents/{p-7dbd0618.entry.js → p-8c16e4aa.entry.js} +1 -1
  123. package/dist/webcomponents/{p-404b3f02.entry.js → p-8ee61443.entry.js} +1 -1
  124. package/dist/webcomponents/{p-c88babbe.entry.js → p-8efea1e4.entry.js} +1 -1
  125. package/dist/webcomponents/p-A2FbmAEt.js +1 -0
  126. package/dist/webcomponents/{p-Dy5btfGV.js → p-B4W3my_D.js} +1 -1
  127. package/dist/webcomponents/{p-CQrwlULd.js → p-BrazW3nF.js} +1 -1
  128. package/dist/webcomponents/{p-BN1PYSFf.js → p-CIOILVyM.js} +1 -1
  129. package/dist/webcomponents/{p-BKM7YeAB.js → p-CPRPR6fJ.js} +1 -1
  130. package/dist/webcomponents/p-CzedYX3W.js +1 -0
  131. package/dist/webcomponents/{p-CVhnuewz.js → p-DUs94fK3.js} +1 -1
  132. package/dist/webcomponents/{p-MdHYTSKO.js → p-DXnwIxTB.js} +1 -1
  133. package/dist/webcomponents/{p-t8p0WAW4.js → p-DeX_cIoV.js} +1 -1
  134. package/dist/webcomponents/{p-Cmb6PRFh.js → p-TKWqvm_A.js} +1 -1
  135. package/dist/webcomponents/{p-BxtmTjqW.js → p-Yp5v6wmS.js} +1 -1
  136. package/dist/webcomponents/{p-BVwVhXcQ.js → p-aZ8YkDMZ.js} +1 -1
  137. package/dist/webcomponents/{p-adddbcb7.entry.js → p-aa42e3c1.entry.js} +1 -1
  138. package/dist/webcomponents/{p-ba0762f9.entry.js → p-ad0f8d85.entry.js} +1 -1
  139. package/dist/webcomponents/{p-0b64560d.entry.js → p-b8c47cb1.entry.js} +1 -1
  140. package/dist/webcomponents/p-c11e6c03.entry.js +1 -0
  141. package/dist/webcomponents/{p-a9f75a9e.entry.js → p-c5af7149.entry.js} +1 -1
  142. package/dist/webcomponents/{p-13bdb5ed.entry.js → p-c7df4370.entry.js} +1 -1
  143. package/dist/webcomponents/p-cf9d8e1a.entry.js +1 -0
  144. package/dist/webcomponents/{p-def8124c.entry.js → p-d3663663.entry.js} +1 -1
  145. package/dist/webcomponents/{p-fe8f8a7f.entry.js → p-daedfe82.entry.js} +1 -1
  146. package/dist/webcomponents/{p-c249483e.entry.js → p-dd11e67b.entry.js} +1 -1
  147. package/dist/webcomponents/{p-1989a253.entry.js → p-e3ab5fe2.entry.js} +1 -1
  148. package/dist/webcomponents/{p-48cf806b.entry.js → p-e95e27af.entry.js} +1 -1
  149. package/dist/webcomponents/{p-3d69b6b1.entry.js → p-f66778b8.entry.js} +1 -1
  150. package/dist/webcomponents/{p-90d1c943.entry.js → p-ff212635.entry.js} +1 -1
  151. package/dist/webcomponents/webcomponents.esm.js +1 -1
  152. package/package.json +1 -1
  153. package/dist/webcomponents/p-499dc735.entry.js +0 -1
  154. package/dist/webcomponents/p-BGHeOtXW.js +0 -1
  155. package/dist/webcomponents/p-BRbk6oSh.js +0 -1
  156. package/dist/webcomponents/p-c14bc83f.entry.js +0 -1
  157. package/dist/webcomponents/p-ed9de6ed.entry.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-DwYM91AU.js';
2
2
  import { A as Api } from './Api-DX-IWyBw.js';
3
- import { A as ApplePayConfig, o as ApplePayHelpers, p as ApplePayPaymentRequest, q as ApplePaySessionStatus, r as ApplePayButtonStyle, s as ApplePayButtonType, c as checkoutStore, t as ApplePayMerchantCapability, G as GooglePayConfig, u as GooglePayHelpers, v as GooglePayPaymentDataRequest, w as GooglePayButtonSizeMode, x as GooglePayButtonStyle, y as GooglePayButtonType, z as GooglePayEnvironment, B as onChange, D as onAnyChange, I as ICheckoutStatus, F as getAvailablePaymentMethodTypes, H as getCheckoutState } from './GooglePay-9bPcqGZ9.js';
3
+ import { A as ApplePayConfig, o as ApplePayHelpers, p as ApplePayPaymentRequest, q as ApplePaySessionStatus, r as ApplePayButtonStyle, s as ApplePayButtonType, c as checkoutStore, t as ApplePayMerchantCapability, G as GooglePayConfig, u as GooglePayHelpers, v as GooglePayPaymentDataRequest, w as GooglePayButtonSizeMode, x as GooglePayButtonStyle, y as GooglePayButtonType, z as GooglePayEnvironment, B as onChange, D as onAnyChange, I as ICheckoutStatus, F as getAvailablePaymentMethodTypes, H as getCheckoutState } from './GooglePay-f7mYX17c.js';
4
4
  import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
5
5
  import './event-types-CZfYo5-1.js';
6
6
  import { S as Skeleton } from './skeleton-BmRZRW5K.js';
@@ -10,7 +10,7 @@ import { P as PAYMENT_METHODS, a as PaymentMethod, b as PAYMENT_MODE } from './i
10
10
  import { H as Header1 } from './header-1-CPF3S2CC.js';
11
11
  import { H as Header2, b as insuranceValuesOn, h as hasInsuranceValueChanged, i as insuranceValues } from './insurance-state-DRe0g_wf.js';
12
12
  import { H as Header3 } from './header-3-Cah707hu.js';
13
- import { J as JustifiAnalytics, c as checkPkgVersion } from './check-pkg-version-B8HjTYV7.js';
13
+ import { J as JustifiAnalytics, c as checkPkgVersion } from './check-pkg-version-Cqb7EhvC.js';
14
14
  import './config-state-C2NXATwF.js';
15
15
  import './dinero-HXpYMWUU.js';
16
16
  import { C as ComponentErrorSeverity, a as ComponentErrorCodes, b as ComponentErrorMessages } from './ComponentError-Cjcsf8ku.js';
@@ -18,10 +18,10 @@ import './Pagination-CLHwhyvu.js';
18
18
  import './Business-B5rtFhtR.js';
19
19
  import './Dispute-BH0Xfn-F.js';
20
20
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
21
- import { C as CheckoutService } from './checkout.service-D-dEMyXF.js';
21
+ import { C as CheckoutService } from './checkout.service-BWdnJLVG.js';
22
22
  import { C as CardBrandLabels } from './payment-method-option-utils-lUHAQVFl.js';
23
23
  import './index-B-fWxE5e.js';
24
- import './package-BGHeOtXW.js';
24
+ import './package-CzedYX3W.js';
25
25
 
26
26
  // Centralized error codes for Apple Pay service
27
27
  var ApplePayServiceErrorCode;
@@ -715,22 +715,44 @@ class GooglePayService {
715
715
  * Initialize Google Pay configuration
716
716
  */
717
717
  initialize(googlePayConfig) {
718
+ console.log('[GooglePayService] initialize: Starting initialization', {
719
+ config: googlePayConfig,
720
+ });
718
721
  this.googlePayConfig = new GooglePayConfig(googlePayConfig);
722
+ console.log('[GooglePayService] initialize: Config object created', {
723
+ isValid: this.googlePayConfig.isValid,
724
+ environment: this.googlePayConfig.environment,
725
+ merchantId: this.googlePayConfig.merchantId,
726
+ });
719
727
  if (!this.googlePayConfig.isValid) {
728
+ console.error('[GooglePayService] initialize: Invalid configuration');
720
729
  throw new Error('Invalid Google Pay configuration provided');
721
730
  }
722
731
  // Create Google Pay client
732
+ console.log('[GooglePayService] initialize: Creating Google Pay client', {
733
+ environment: this.googlePayConfig.environment,
734
+ });
723
735
  this.googlePayClient = GooglePayHelpers.createGooglePayClient(this.googlePayConfig.environment);
724
736
  if (!this.googlePayClient) {
737
+ console.error('[GooglePayService] initialize: Failed to create client');
725
738
  throw new Error('Failed to create Google Pay client');
726
739
  }
727
- // No debug logs
740
+ console.log('[GooglePayService] initialize: Client created successfully', {
741
+ hasClient: !!this.googlePayClient,
742
+ });
728
743
  }
729
744
  /**
730
745
  * Process Google Pay payment via API
731
746
  */
732
747
  async processPayment(authToken, accountId, payload) {
748
+ var _a;
733
749
  const endpoint = PROCESS_TOKEN_ENDPOINT;
750
+ console.log('[GooglePayService] processPayment: Starting', {
751
+ endpoint,
752
+ hasAuthToken: !!authToken,
753
+ accountId,
754
+ payload,
755
+ });
734
756
  try {
735
757
  const result = await this.api.post({
736
758
  endpoint,
@@ -740,12 +762,20 @@ class GooglePayService {
740
762
  'sub-account': accountId,
741
763
  },
742
764
  });
765
+ console.log('[GooglePayService] processPayment: API response received', {
766
+ hasId: !!result.id,
767
+ hasToken: !!((_a = result.data) === null || _a === void 0 ? void 0 : _a.token),
768
+ result,
769
+ });
770
+ const success = result.id && !!result.data.token;
771
+ console.log('[GooglePayService] processPayment: Result', { success });
743
772
  return {
744
- success: result.id && !!result.data.token,
773
+ success,
745
774
  data: result,
746
775
  };
747
776
  }
748
- catch (_error) {
777
+ catch (error) {
778
+ console.error('[GooglePayService] processPayment: API error', error);
749
779
  throw new Error('Google Pay payment processing failed');
750
780
  }
751
781
  }
@@ -753,21 +783,42 @@ class GooglePayService {
753
783
  * Check if Google Pay is available on this device/browser
754
784
  */
755
785
  isAvailable() {
756
- return GooglePayHelpers.isGooglePaySupported() && !!this.googlePayClient;
786
+ const isSupported = GooglePayHelpers.isGooglePaySupported();
787
+ const hasClient = !!this.googlePayClient;
788
+ const result = isSupported && hasClient;
789
+ console.log('[GooglePayService] isAvailable:', {
790
+ isSupported,
791
+ hasClient,
792
+ result,
793
+ });
794
+ return result;
757
795
  }
758
796
  /**
759
797
  * Check if the user can make payments with Google Pay
760
798
  */
761
799
  async canMakePayments() {
800
+ console.log('[GooglePayService] canMakePayments: Checking', {
801
+ hasClient: !!this.googlePayClient,
802
+ hasConfig: !!this.googlePayConfig,
803
+ });
762
804
  if (!this.googlePayClient || !this.googlePayConfig) {
805
+ console.warn('[GooglePayService] canMakePayments: Missing client or config');
763
806
  return false;
764
807
  }
765
808
  try {
766
809
  const baseRequest = GooglePayHelpers.createBasePaymentDataRequest();
810
+ console.log('[GooglePayService] canMakePayments: Calling isReadyToPay', {
811
+ baseRequest,
812
+ });
767
813
  const response = await this.googlePayClient.isReadyToPay(baseRequest);
814
+ console.log('[GooglePayService] canMakePayments: Response received', {
815
+ result: response.result,
816
+ response,
817
+ });
768
818
  return response.result;
769
819
  }
770
- catch (_error) {
820
+ catch (error) {
821
+ console.error('[GooglePayService] canMakePayments: Error', error);
771
822
  return false;
772
823
  }
773
824
  }
@@ -776,27 +827,53 @@ class GooglePayService {
776
827
  */
777
828
  async startPaymentSession(paymentDataRequest, authToken, accountId) {
778
829
  var _a;
830
+ console.log('[GooglePayService] startPaymentSession: Starting', {
831
+ hasConfig: !!this.googlePayConfig,
832
+ hasClient: !!this.googlePayClient,
833
+ hasAuthToken: !!authToken,
834
+ accountId,
835
+ paymentDataRequest,
836
+ });
779
837
  if (!this.googlePayConfig || !this.googlePayClient) {
838
+ console.error('[GooglePayService] startPaymentSession: Not initialized');
780
839
  throw new Error('Google Pay not initialized. Call initialize() first.');
781
840
  }
782
841
  if (!this.isAvailable()) {
842
+ console.error('[GooglePayService] startPaymentSession: Not available');
783
843
  throw new Error('Google Pay is not available on this device/browser');
784
844
  }
785
845
  const request = new GooglePayPaymentDataRequest(paymentDataRequest);
846
+ console.log('[GooglePayService] startPaymentSession: Request object created', {
847
+ isValid: request.isValid,
848
+ request,
849
+ });
786
850
  if (!request.isValid) {
851
+ console.error('[GooglePayService] startPaymentSession: Invalid request');
787
852
  throw new Error('Invalid payment data request provided');
788
853
  }
789
854
  try {
855
+ console.log('[GooglePayService] startPaymentSession: Loading payment data...');
790
856
  const paymentData = await this.googlePayClient.loadPaymentData(request);
857
+ console.log('[GooglePayService] startPaymentSession: Payment data loaded', {
858
+ hasPaymentData: !!paymentData,
859
+ paymentMethodData: paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentMethodData,
860
+ });
791
861
  // Build top-level snake_case fields from Google Pay tokenizationData
792
862
  const tokenizationData = (_a = paymentData === null || paymentData === void 0 ? void 0 : paymentData.paymentMethodData) === null || _a === void 0 ? void 0 : _a.tokenizationData;
863
+ console.log('[GooglePayService] startPaymentSession: Extracted tokenization data', {
864
+ hasTokenizationData: !!tokenizationData,
865
+ tokenizationData,
866
+ });
793
867
  const tokenObj = (() => {
794
868
  if ((tokenizationData === null || tokenizationData === void 0 ? void 0 : tokenizationData.token) &&
795
869
  typeof tokenizationData.token === 'string') {
796
870
  try {
797
- return JSON.parse(tokenizationData.token);
871
+ const parsed = JSON.parse(tokenizationData.token);
872
+ console.log('[GooglePayService] startPaymentSession: Parsed token', parsed);
873
+ return parsed;
798
874
  }
799
875
  catch (_e) {
876
+ console.warn('[GooglePayService] startPaymentSession: Failed to parse token, using raw', _e);
800
877
  return tokenizationData;
801
878
  }
802
879
  }
@@ -813,8 +890,19 @@ class GooglePayService {
813
890
  : undefined,
814
891
  signedMessage: tokenObj === null || tokenObj === void 0 ? void 0 : tokenObj.signedMessage,
815
892
  };
893
+ console.log('[GooglePayService] startPaymentSession: Token process request created', {
894
+ hasProtocolVersion: !!tokenProcessRequest.protocolVersion,
895
+ hasSignature: !!tokenProcessRequest.signature,
896
+ hasSignedMessage: !!tokenProcessRequest.signedMessage,
897
+ hasIntermediateSigningKey: !!tokenProcessRequest.intermediateSigningKey,
898
+ });
899
+ console.log('[GooglePayService] startPaymentSession: Processing payment...');
816
900
  const paymentResult = await this.processPayment(authToken, accountId, tokenProcessRequest);
901
+ console.log('[GooglePayService] startPaymentSession: Payment processed', paymentResult);
817
902
  if (paymentResult.success) {
903
+ console.log('[GooglePayService] startPaymentSession: Payment successful', {
904
+ paymentMethodId: paymentResult.data.id,
905
+ });
818
906
  return {
819
907
  success: true,
820
908
  paymentData: paymentData,
@@ -822,6 +910,7 @@ class GooglePayService {
822
910
  };
823
911
  }
824
912
  else {
913
+ console.error('[GooglePayService] startPaymentSession: Payment processing failed');
825
914
  return {
826
915
  success: false,
827
916
  error: {
@@ -832,11 +921,17 @@ class GooglePayService {
832
921
  }
833
922
  }
834
923
  catch (error) {
924
+ console.error('[GooglePayService] startPaymentSession: Exception caught', error);
835
925
  // Handle different types of errors
836
926
  if (error && typeof error === 'object' && 'statusCode' in error) {
837
927
  const googlePayError = error;
928
+ console.log('[GooglePayService] startPaymentSession: Google Pay error', {
929
+ statusCode: googlePayError.statusCode,
930
+ statusMessage: googlePayError.statusMessage,
931
+ });
838
932
  switch (googlePayError.statusCode) {
839
933
  case 'CANCELED':
934
+ console.log('[GooglePayService] startPaymentSession: User cancelled');
840
935
  return {
841
936
  success: false,
842
937
  error: {
@@ -845,6 +940,7 @@ class GooglePayService {
845
940
  },
846
941
  };
847
942
  case 'DEVELOPER_ERROR':
943
+ console.error('[GooglePayService] startPaymentSession: Developer error');
848
944
  return {
849
945
  success: false,
850
946
  error: {
@@ -853,6 +949,9 @@ class GooglePayService {
853
949
  },
854
950
  };
855
951
  default:
952
+ console.error('[GooglePayService] startPaymentSession: Unknown error', {
953
+ statusCode: googlePayError.statusCode,
954
+ });
856
955
  return {
857
956
  success: false,
858
957
  error: {
@@ -862,6 +961,7 @@ class GooglePayService {
862
961
  };
863
962
  }
864
963
  }
964
+ console.error('[GooglePayService] startPaymentSession: Generic error', error);
865
965
  return {
866
966
  success: false,
867
967
  error: {
@@ -897,22 +997,43 @@ class GooglePayService {
897
997
  * Prefetch payment data for faster loading
898
998
  */
899
999
  prefetchPaymentData(paymentDataRequest) {
1000
+ console.log('[GooglePayService] prefetchPaymentData: Starting', {
1001
+ hasClient: !!this.googlePayClient,
1002
+ paymentDataRequest,
1003
+ });
900
1004
  if (!this.googlePayClient) {
1005
+ console.warn('[GooglePayService] prefetchPaymentData: No client available');
901
1006
  return;
902
1007
  }
903
1008
  const request = new GooglePayPaymentDataRequest(paymentDataRequest);
1009
+ console.log('[GooglePayService] prefetchPaymentData: Request created', {
1010
+ isValid: request.isValid,
1011
+ });
904
1012
  if (!request.isValid) {
1013
+ console.warn('[GooglePayService] prefetchPaymentData: Invalid request');
905
1014
  return;
906
1015
  }
907
1016
  try {
1017
+ console.log('[GooglePayService] prefetchPaymentData: Calling prefetchPaymentData');
908
1018
  this.googlePayClient.prefetchPaymentData(request);
1019
+ console.log('[GooglePayService] prefetchPaymentData: Prefetch complete');
1020
+ }
1021
+ catch (error) {
1022
+ console.error('[GooglePayService] prefetchPaymentData: Error', error);
909
1023
  }
910
- catch (_error) { }
911
1024
  }
912
1025
  /**
913
1026
  * Create a basic payment data request
914
1027
  */
915
- static createPaymentDataRequest(amount, label, countryCode = 'US', currencyCode = 'USD', merchantName) {
1028
+ static createPaymentDataRequest(amount, label, countryCode = 'US', currencyCode = 'USD', merchantName, merchantId) {
1029
+ var _a;
1030
+ console.log('[GooglePayService] createPaymentDataRequest: Creating request', {
1031
+ amount,
1032
+ label,
1033
+ countryCode,
1034
+ currencyCode,
1035
+ merchantName,
1036
+ });
916
1037
  const request = {
917
1038
  apiVersion: 2,
918
1039
  apiVersionMinor: 0,
@@ -925,10 +1046,17 @@ class GooglePayService {
925
1046
  totalPriceLabel: label,
926
1047
  },
927
1048
  merchantInfo: {
1049
+ merchantId,
928
1050
  merchantName,
929
1051
  },
930
1052
  };
931
- // No debug logs
1053
+ console.log('[GooglePayService] createPaymentDataRequest: Request created', {
1054
+ apiVersion: request.apiVersion,
1055
+ apiVersionMinor: request.apiVersionMinor,
1056
+ transactionInfo: request.transactionInfo,
1057
+ merchantInfo: request.merchantInfo,
1058
+ allowedPaymentMethodsCount: (_a = request.allowedPaymentMethods) === null || _a === void 0 ? void 0 : _a.length,
1059
+ });
932
1060
  return request;
933
1061
  }
934
1062
  /**
@@ -1030,7 +1158,7 @@ const GooglePayButton = (props) => {
1030
1158
  props.clickHandler();
1031
1159
  }
1032
1160
  };
1033
- return (h("div", { class: 'google-pay-button-container' }, h("button", Object.assign({ class: getGooglePayButtonClass(), style: getButtonStyles(), onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": 'Pay with Google Pay', type: 'button' }, props), props.isProcessing && ProcessingSpinner(), h("div", { class: 'google-pay-button-content' }, h("svg", { class: 'google-g-logo', viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg' }, h("path", { d: 'M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z', fill: '#4285F4' }), h("path", { d: 'M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z', fill: '#34A853' }), h("path", { d: 'M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z', fill: '#FBBC05' }), h("path", { d: 'M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z', fill: '#EA4335' })), h("span", { class: 'pay-text' }, "Pay"))), h("style", null, `
1161
+ return (h("div", { class: "google-pay-button-container" }, h("button", Object.assign({ class: getGooglePayButtonClass(), style: getButtonStyles(), onClick: handleClick, disabled: props.disabled || props.isProcessing || !props.isAvailable, "aria-label": "Google Pay", type: "button" }, props), props.isProcessing && ProcessingSpinner(), h("div", { class: 'google-pay-button-content' }, h("svg", { width: "41", height: "17", xmlns: "http://www.w3.org/2000/svg" }, h("g", { fill: "none", "fill-rule": "evenodd" }, h("path", { d: "M19.526 2.635v4.083h2.518c.6 0 1.096-.202 1.488-.605.403-.402.605-.882.605-1.437 0-.544-.202-1.018-.605-1.422-.392-.413-.888-.62-1.488-.62h-2.518zm0 5.52v4.736h-1.504V1.198h3.99c1.013 0 1.873.337 2.582 1.012.72.675 1.08 1.497 1.08 2.466 0 .991-.36 1.819-1.08 2.482-.697.665-1.559.996-2.583.996h-2.485v.001zm7.668 2.287c0 .392.166.718.499.98.332.26.722.391 1.168.391.633 0 1.196-.234 1.692-.701.497-.469.744-1.019.744-1.65-.469-.37-1.123-.555-1.962-.555-.61 0-1.12.148-1.528.442-.409.294-.613.657-.613 1.093m1.946-5.815c1.112 0 1.989.297 2.633.89.642.594.964 1.408.964 2.442v4.932h-1.439v-1.11h-.065c-.622.914-1.45 1.372-2.486 1.372-.882 0-1.621-.262-2.215-.784-.594-.523-.891-1.176-.891-1.96 0-.828.313-1.486.94-1.976s1.463-.735 2.51-.735c.892 0 1.629.163 2.206.49v-.344c0-.522-.207-.966-.621-1.33a2.132 2.132 0 0 0-1.455-.547c-.84 0-1.504.353-1.995 1.062l-1.324-.834c.73-1.045 1.81-1.568 3.238-1.568m11.853.262l-5.02 11.53H34.42l1.864-4.034-3.302-7.496h1.635l2.387 5.749h.032l2.322-5.75z", fill: "#FFF" }), h("path", { d: "M13.448 7.134c0-.473-.04-.93-.116-1.366H6.988v2.588h3.634a3.11 3.11 0 0 1-1.344 2.042v1.68h2.169c1.27-1.17 2.001-2.9 2.001-4.944", fill: "#4285F4" }), h("path", { d: "M6.988 13.7c1.816 0 3.344-.595 4.459-1.621l-2.169-1.681c-.603.406-1.38.643-2.29.643-1.754 0-3.244-1.182-3.776-2.774H.978v1.731a6.728 6.728 0 0 0 6.01 3.703", fill: "#34A853" }), h("path", { d: "M3.212 8.267a4.034 4.034 0 0 1 0-2.572V3.964H.978A6.678 6.678 0 0 0 .261 6.98c0 1.085.26 2.11.717 3.017l2.234-1.731z", fill: "#FABB05" }), h("path", { d: "M6.988 2.921c.992 0 1.88.34 2.58 1.008v.001l1.92-1.918C10.324.928 8.804.262 6.989.262a6.728 6.728 0 0 0-6.01 3.702l2.234 1.731c.532-1.592 2.022-2.774 3.776-2.774", fill: "#E94235" }))))), h("style", null, `
1034
1162
  .google-pay-button-container {
1035
1163
  display: block;
1036
1164
  position: relative;
@@ -1043,7 +1171,6 @@ const GooglePayButton = (props) => {
1043
1171
  border: none;
1044
1172
  border-radius: 4px;
1045
1173
  cursor: pointer;
1046
- font-family: 'Google Sans', arial, sans-serif;
1047
1174
  font-size: 14px;
1048
1175
  font-weight: 500;
1049
1176
  letter-spacing: 0.25px;
@@ -1051,7 +1178,6 @@ const GooglePayButton = (props) => {
1051
1178
  outline: none;
1052
1179
  padding: 0 20px;
1053
1180
  position: relative;
1054
- transition: box-shadow 0.2s ease;
1055
1181
  min-width: 140px;
1056
1182
  min-height: 48px;
1057
1183
  }
@@ -1060,13 +1186,11 @@ const GooglePayButton = (props) => {
1060
1186
  .google-pay-button.google-pay-button-black {
1061
1187
  background-color: #000;
1062
1188
  color: #fff;
1063
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
1064
1189
  }
1065
1190
 
1066
1191
  .google-pay-button.google-pay-button-white {
1067
1192
  background-color: #fff;
1068
1193
  color: #3c4043;
1069
- box-shadow: 0 1px 1px 0 rgba(60, 64, 67, 0.30), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
1070
1194
  }
1071
1195
 
1072
1196
  /* Button content */
@@ -1230,19 +1354,42 @@ const GooglePay = class {
1230
1354
  this.showSkeleton = true;
1231
1355
  this.handleGooglePayClick = async () => {
1232
1356
  var _a;
1357
+ console.log('[GooglePay] handleGooglePayClick: Button clicked', {
1358
+ isProcessing: this.isProcessing,
1359
+ disabled: this.disabled,
1360
+ isAvailable: this.isAvailable,
1361
+ canMakePayments: this.canMakePayments,
1362
+ });
1233
1363
  if (this.isProcessing ||
1234
1364
  this.disabled ||
1235
1365
  !this.isAvailable ||
1236
1366
  !this.canMakePayments) {
1367
+ console.warn('[GooglePay] handleGooglePayClick: Payment blocked', {
1368
+ reason: this.isProcessing ? 'isProcessing' :
1369
+ this.disabled ? 'disabled' :
1370
+ !this.isAvailable ? 'notAvailable' :
1371
+ !this.canMakePayments ? 'cannotMakePayments' : 'unknown',
1372
+ });
1237
1373
  return;
1238
1374
  }
1239
1375
  try {
1376
+ console.log('[GooglePay] handleGooglePayClick: Starting payment session');
1240
1377
  this.isProcessing = true;
1241
1378
  this.error = null;
1242
1379
  this.googlePayStarted.emit();
1380
+ console.log('[GooglePay] handleGooglePayClick: googlePayStarted event emitted');
1243
1381
  const paymentDataRequest = this.createPaymentDataRequest();
1382
+ console.log('[GooglePay] handleGooglePayClick: Starting payment session with service', {
1383
+ hasAuthToken: !!checkoutStore.authToken,
1384
+ accountId: checkoutStore.accountId,
1385
+ });
1244
1386
  const result = await this.googlePayService.startPaymentSession(paymentDataRequest, checkoutStore.authToken, checkoutStore.accountId);
1387
+ console.log('[GooglePay] handleGooglePayClick: Payment session result', result);
1245
1388
  if (result.success) {
1389
+ console.log('[GooglePay] handleGooglePayClick: Payment successful', {
1390
+ paymentMethodId: result.paymentMethodId,
1391
+ hasPaymentData: !!result.paymentData,
1392
+ });
1246
1393
  this.googlePayCompleted.emit({
1247
1394
  success: true,
1248
1395
  paymentData: result.paymentData,
@@ -1250,16 +1397,21 @@ const GooglePay = class {
1250
1397
  });
1251
1398
  }
1252
1399
  else {
1400
+ console.error('[GooglePay] handleGooglePayClick: Payment failed', {
1401
+ error: result.error,
1402
+ });
1253
1403
  this.googlePayCompleted.emit({
1254
1404
  success: false,
1255
1405
  error: result.error,
1256
1406
  });
1257
1407
  if (((_a = result.error) === null || _a === void 0 ? void 0 : _a.code) === "USER_CANCELLED") {
1408
+ console.log('[GooglePay] handleGooglePayClick: User cancelled payment');
1258
1409
  this.googlePayCancelled.emit();
1259
1410
  }
1260
1411
  }
1261
1412
  }
1262
1413
  catch (error) {
1414
+ console.error('[GooglePay] handleGooglePayClick: Exception during payment', error);
1263
1415
  const errorMessage = error instanceof Error ? error.message : "Payment failed";
1264
1416
  this.error = errorMessage;
1265
1417
  this.googlePayCompleted.emit({
@@ -1269,27 +1421,48 @@ const GooglePay = class {
1269
1421
  }
1270
1422
  finally {
1271
1423
  this.isProcessing = false;
1424
+ console.log('[GooglePay] handleGooglePayClick: Payment flow complete', {
1425
+ isProcessing: this.isProcessing,
1426
+ error: this.error,
1427
+ });
1272
1428
  }
1273
1429
  };
1274
1430
  }
1275
1431
  watchConfigChange() {
1432
+ console.log('[GooglePay] watchConfigChange: Configuration changed', {
1433
+ merchantId: this.merchantId,
1434
+ environment: this.environment,
1435
+ });
1276
1436
  this.initializeGooglePay();
1277
1437
  }
1278
1438
  componentWillLoad() {
1439
+ console.log('[GooglePay] componentWillLoad: Initializing GooglePayService');
1279
1440
  this.googlePayService = new GooglePayService();
1441
+ console.log('[GooglePay] componentWillLoad: GooglePayService created', {
1442
+ service: this.googlePayService,
1443
+ });
1280
1444
  }
1281
1445
  componentDidLoad() {
1446
+ console.log('[GooglePay] componentDidLoad: Setting up store subscriptions', {
1447
+ checkoutLoaded: checkoutStore.checkoutLoaded,
1448
+ paymentAmount: checkoutStore.paymentAmount,
1449
+ paymentCurrency: checkoutStore.paymentCurrency,
1450
+ paymentDescription: checkoutStore.paymentDescription,
1451
+ });
1282
1452
  const unsub = onChange("paymentAmount", () => {
1453
+ console.log('[GooglePay] paymentAmount changed:', checkoutStore.paymentAmount);
1283
1454
  this.prefetchPaymentData();
1284
1455
  });
1285
1456
  if (typeof unsub === 'function')
1286
1457
  this.unsubscribes.push(unsub);
1287
1458
  const unsubCurrency = onChange("paymentCurrency", () => {
1459
+ console.log('[GooglePay] paymentCurrency changed:', checkoutStore.paymentCurrency);
1288
1460
  this.prefetchPaymentData();
1289
1461
  });
1290
1462
  if (typeof unsubCurrency === 'function')
1291
1463
  this.unsubscribes.push(unsubCurrency);
1292
1464
  const unsubDesc = onChange("paymentDescription", () => {
1465
+ console.log('[GooglePay] paymentDescription changed:', checkoutStore.paymentDescription);
1293
1466
  this.prefetchPaymentData();
1294
1467
  });
1295
1468
  if (typeof unsubDesc === 'function')
@@ -1338,17 +1511,31 @@ const GooglePay = class {
1338
1511
  * Prefetch payment data for faster load times of the Google Pay sheet.
1339
1512
  */
1340
1513
  async prefetchPaymentData() {
1514
+ console.log('[GooglePay] prefetchPaymentData: Called', {
1515
+ isAvailable: this.isAvailable,
1516
+ canMakePayments: this.canMakePayments,
1517
+ });
1341
1518
  if (!this.isAvailable || !this.canMakePayments) {
1519
+ console.warn('[GooglePay] prefetchPaymentData: Skipped - not available or cannot make payments');
1342
1520
  return;
1343
1521
  }
1344
1522
  const paymentDataRequest = this.createPaymentDataRequest();
1523
+ console.log('[GooglePay] prefetchPaymentData: Prefetching', { paymentDataRequest });
1345
1524
  this.googlePayService.prefetchPaymentData(paymentDataRequest);
1525
+ console.log('[GooglePay] prefetchPaymentData: Prefetch complete');
1346
1526
  }
1347
1527
  async initializeGooglePay() {
1528
+ console.log('[GooglePay] initializeGooglePay: Starting initialization');
1348
1529
  try {
1349
1530
  this.isLoading = true;
1350
1531
  this.error = null;
1532
+ console.log('[GooglePay] initializeGooglePay: Checking payment amount', {
1533
+ paymentAmount: checkoutStore.paymentAmount,
1534
+ paymentCurrency: checkoutStore.paymentCurrency,
1535
+ paymentDescription: checkoutStore.paymentDescription,
1536
+ });
1351
1537
  if (!checkoutStore.paymentAmount) {
1538
+ console.error('[GooglePay] initializeGooglePay: Missing payment amount');
1352
1539
  this.error = "Missing required Google Pay configuration";
1353
1540
  this.isLoading = false;
1354
1541
  return;
@@ -1361,23 +1548,39 @@ const GooglePay = class {
1361
1548
  buttonStyle: this.buttonStyle,
1362
1549
  buttonSizeMode: this.buttonSizeMode,
1363
1550
  };
1551
+ console.log('[GooglePay] initializeGooglePay: Config created', googlePayConfig);
1364
1552
  this.googlePayService.initialize(googlePayConfig);
1553
+ console.log('[GooglePay] initializeGooglePay: Service initialized');
1365
1554
  this.isAvailable = this.googlePayService.isAvailable();
1555
+ console.log('[GooglePay] initializeGooglePay: Availability check', {
1556
+ isAvailable: this.isAvailable,
1557
+ });
1366
1558
  if (!this.isAvailable) {
1559
+ console.warn('[GooglePay] initializeGooglePay: Google Pay not available on device');
1367
1560
  this.error = "Google Pay is not supported on this device";
1368
1561
  this.isLoading = false;
1369
1562
  return;
1370
1563
  }
1564
+ console.log('[GooglePay] initializeGooglePay: Checking canMakePayments...');
1371
1565
  this.canMakePayments = await this.googlePayService.canMakePayments();
1566
+ console.log('[GooglePay] initializeGooglePay: canMakePayments result', {
1567
+ canMakePayments: this.canMakePayments,
1568
+ });
1372
1569
  if (!this.canMakePayments) {
1570
+ console.warn('[GooglePay] initializeGooglePay: Cannot make payments');
1373
1571
  this.error = "Google Pay is not available for payments";
1374
1572
  this.isLoading = false;
1375
1573
  return;
1376
1574
  }
1377
1575
  const paymentDataRequest = this.createPaymentDataRequest();
1576
+ console.log('[GooglePay] initializeGooglePay: Prefetching payment data', {
1577
+ paymentDataRequest,
1578
+ });
1378
1579
  this.googlePayService.prefetchPaymentData(paymentDataRequest);
1580
+ console.log('[GooglePay] initializeGooglePay: Initialization complete');
1379
1581
  }
1380
1582
  catch (error) {
1583
+ console.error('[GooglePay] initializeGooglePay: Error during initialization', error);
1381
1584
  this.error =
1382
1585
  error instanceof Error
1383
1586
  ? error.message
@@ -1385,19 +1588,37 @@ const GooglePay = class {
1385
1588
  }
1386
1589
  finally {
1387
1590
  this.isLoading = false;
1591
+ console.log('[GooglePay] initializeGooglePay: Final state', {
1592
+ isLoading: this.isLoading,
1593
+ isAvailable: this.isAvailable,
1594
+ canMakePayments: this.canMakePayments,
1595
+ error: this.error,
1596
+ });
1388
1597
  }
1389
1598
  }
1390
1599
  createPaymentDataRequest() {
1391
- return GooglePayService.createPaymentDataRequest(checkoutStore.paymentAmount, checkoutStore.paymentDescription, this.countryCode, checkoutStore.paymentCurrency, this.merchantName);
1600
+ const request = GooglePayService.createPaymentDataRequest(checkoutStore.paymentAmount, checkoutStore.paymentDescription, this.countryCode, checkoutStore.paymentCurrency, this.merchantName, this.merchantId);
1601
+ console.log('[GooglePay] createPaymentDataRequest: Created request', {
1602
+ amount: checkoutStore.paymentAmount,
1603
+ currency: checkoutStore.paymentCurrency,
1604
+ description: checkoutStore.paymentDescription,
1605
+ countryCode: this.countryCode,
1606
+ merchantName: this.merchantName,
1607
+ request,
1608
+ });
1609
+ return request;
1392
1610
  }
1393
1611
  render() {
1394
1612
  const showError = !this.isLoading && !!this.error;
1395
1613
  const showDeviceUnavailable = !this.isLoading && !this.error && !this.isAvailable;
1396
1614
  const showPaymentsUnavailable = !this.isLoading && !this.error && this.isAvailable && !this.canMakePayments;
1397
1615
  const showButton = !this.isLoading && !this.error && this.isAvailable && this.canMakePayments;
1398
- return (h(StyledHost, { key: 'd85684b123cdba175d68a2e216f9150780ac7cf9' }, checkoutStore.checkoutLoaded && (h("script", { key: 'b78bb8980d670e5b66cb907f89cee6ff2238205c', async: true, src: 'https://pay.google.com/gp/p/js/pay.js', onLoad: () => {
1616
+ return (h(StyledHost, { key: 'cf4dcfa14dd83683c0d6e811ea464968c38f38d6' }, checkoutStore.checkoutLoaded && (h("script", { key: 'e942fe8e2eb80ee0d2119e864c62d89a79d9d12a', async: true, src: 'https://pay.google.com/gp/p/js/pay.js', onLoad: () => {
1617
+ console.log('[GooglePay] Script loaded: Google Pay JS library loaded successfully');
1399
1618
  this.initializeGooglePay();
1400
- } })), h("div", { key: 'e405efb3a164be9e1d9db5beeb3c01471b647aaf', class: 'google-pay-container' }, h(GooglePaySkeleton, { key: 'c17dbb3e305678a1da10e3741ff0b610c549be6e', isLoading: this.isLoading }), showError && (h("div", { key: '726895b7c76f3edbbbb1930a317d826b8f8f11fd', class: 'google-pay-error', role: 'alert', "data-testid": 'gp-error' }, h("span", { key: '23342ca70b6b5bf28f846ca519cc4fbfb065fc67', class: 'error-icon' }, "\u26A0\uFE0F"), h("span", { key: '008315696bc7b7f78f69cfc80160dacabf1205b5', class: 'error-message' }, this.error))), showDeviceUnavailable && (h("div", { key: '2e87b4a9e5d0c0201333b79b9c190ca14932391b', class: 'google-pay-unavailable', "data-testid": 'gp-device-unavailable' }, h("span", { key: '6db13fc44661500a964422d18550cb31e275f076', class: 'unavailable-message' }, "Google Pay is not available on this device"))), showPaymentsUnavailable && (h("div", { key: 'c2ca09e36652800092cc6bcbe4a351b0d604bae2', class: 'google-pay-unavailable', "data-testid": 'gp-payments-unavailable' }, h("span", { key: 'a5e75ccbb269249327192b927a0df879d90aefe5', class: 'unavailable-message' }, "Google Pay is not available for payments"))), showButton && (h(GooglePayButton, { key: 'a2af46b3970620491e5c005e2b57f7a6d6f06e2c', "data-testid": 'gp-button', buttonType: this.buttonType, buttonStyle: this.buttonStyle, buttonSizeMode: this.buttonSizeMode, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleGooglePayClick }))), h("style", { key: '9890ac44c4f047484396e0b4ae0d04a31489e61f' }, `
1619
+ }, onError: (e) => {
1620
+ console.error('[GooglePay] Script error: Failed to load Google Pay JS library', e);
1621
+ } })), h("div", { key: '7ce1234392d3ea3abdcb1a385462cf740f4b98bb', class: 'google-pay-container' }, h(GooglePaySkeleton, { key: '3532e93f39bb69d76663c159bc6b1322a39e1361', isLoading: this.isLoading }), showError && (h("div", { key: '9e42e567d383522d03bc361008cb470fd2e2d602', class: 'google-pay-error', role: 'alert', "data-testid": 'gp-error' }, h("span", { key: '8b49d628ff8f5175d36f82e32191f1f3291e826f', class: 'error-icon' }, "\u26A0\uFE0F"), h("span", { key: 'b01e94934cd30b8dbad3127239ea625c51511d35', class: 'error-message' }, this.error))), showDeviceUnavailable && (h("div", { key: '12ad123c7516e9ce2ad1084f6b0c366e8bb5b9d5', class: 'google-pay-unavailable', "data-testid": 'gp-device-unavailable' }, h("span", { key: 'e0fa8f13423b6b545b340cc4b2b0411e833202c6', class: 'unavailable-message' }, "Google Pay is not available on this device"))), showPaymentsUnavailable && (h("div", { key: 'acb4c6661ca0aa6b944c8ed67642c4ad9effa1e5', class: 'google-pay-unavailable', "data-testid": 'gp-payments-unavailable' }, h("span", { key: '8a83dc8f5140d3ecade1fd68f69b5ebeaeb020d2', class: 'unavailable-message' }, "Google Pay is not available for payments"))), showButton && (h(GooglePayButton, { key: '46ea586c90aaa5eb909af4f1dfcb873a7ac50069', "data-testid": 'gp-button', buttonType: this.buttonType, buttonStyle: this.buttonStyle, buttonSizeMode: this.buttonSizeMode, disabled: this.disabled, isProcessing: this.isProcessing, isAvailable: this.isAvailable, clickHandler: this.handleGooglePayClick }))), h("style", { key: '8f77166ec7d772f0c51c74cdb166f9e8ae295088' }, `
1401
1622
  .google-pay-container {
1402
1623
  width: 100%;
1403
1624
  }
@@ -1,22 +1,22 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-DwYM91AU.js';
2
2
  import { E as ErrorState } from './utils-BX7Rjm1M.js';
3
- import { B as BusinessService } from './business.service-2j91Emgq.js';
3
+ import { B as BusinessService } from './business.service-CzHfftZk.js';
4
4
  import { m as makeGetBusiness } from './get-business-Xt7B5dSo.js';
5
5
  import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
6
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-B8HjTYV7.js';
6
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-Cqb7EhvC.js';
7
7
  import './parts-wtuY7MT2.js';
8
8
  import './Api-DX-IWyBw.js';
9
9
  import './config-state-C2NXATwF.js';
10
10
  import './index-B-fWxE5e.js';
11
11
  import './utils-CIaHqjQt.js';
12
12
  import './dinero-HXpYMWUU.js';
13
- import './GooglePay-9bPcqGZ9.js';
13
+ import './GooglePay-f7mYX17c.js';
14
14
  import './Dispute-BH0Xfn-F.js';
15
15
  import './index-DkoufM1t.js';
16
16
  import './Pagination-CLHwhyvu.js';
17
17
  import './Business-B5rtFhtR.js';
18
18
  import './utils-BeQLScSm.js';
19
- import './package-BGHeOtXW.js';
19
+ import './package-CzedYX3W.js';
20
20
 
21
21
  const BusinessDetails = class {
22
22
  constructor(hostRef) {