@justifi/webcomponents 6.5.1-rc.2 → 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.
- package/dist/cjs/{GooglePay-HXBAmTgL.js → GooglePay-40aEKdDF.js} +40 -9
- package/dist/cjs/bank-account-document-form-inputs_6.cjs.entry.js +1 -1
- package/dist/cjs/{business.service-DMzf08nC.js → business.service-BggHdPOV.js} +1 -1
- package/dist/cjs/{check-pkg-version-Bw6Rz_E3.js → check-pkg-version-DuPkU5qI.js} +2 -2
- package/dist/cjs/{checkout.service-CHNHEsrp.js → checkout.service-BUcIs9az.js} +1 -1
- package/dist/cjs/checkouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/{dispute.service-B63kcFkU.js → dispute.service-CxWqivLc.js} +1 -1
- package/dist/cjs/{get-payment-details-BN139jp0.js → get-payment-details-D_dDxsPG.js} +1 -1
- package/dist/cjs/{get-subaccounts-IgHJX5J4.js → get-subaccounts-_D9lzD5O.js} +1 -1
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +3 -3
- package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +1 -1
- package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +2 -2
- package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +241 -16
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +4 -4
- package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +4 -4
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +5 -5
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -5
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +5 -5
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +5 -5
- package/dist/cjs/{package--UMqvxMQ.js → package-C6nOTkVV.js} +1 -1
- package/dist/cjs/payment-details-core.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-eOZc1Qay.js → payment.service-wWZTmyFv.js} +1 -1
- package/dist/cjs/payments-list-core.cjs.entry.js +1 -1
- package/dist/cjs/{payout.service-QVl5N-UV.js → payout.service-CWAem5VG.js} +1 -1
- package/dist/cjs/payouts-list-core.cjs.entry.js +1 -1
- package/dist/cjs/terminal-orders-list-core.cjs.entry.js +2 -2
- package/dist/cjs/{terminal-orders-table-g2fwrh2P.js → terminal-orders-table-DBNG4K5I.js} +1 -1
- package/dist/cjs/{terminal.service-BuSFyt0j.js → terminal.service-DSlqCGxE.js} +1 -1
- package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
- package/dist/collection/api/GooglePay.js +40 -9
- package/dist/collection/api/services/google-pay.service.js +137 -9
- package/dist/collection/components/modular-checkout/sub-components/google-pay.js +100 -3
- package/dist/docs.json +1 -1
- package/dist/esm/{GooglePay-9bPcqGZ9.js → GooglePay-f7mYX17c.js} +40 -9
- package/dist/esm/bank-account-document-form-inputs_6.entry.js +1 -1
- package/dist/esm/{business.service-2j91Emgq.js → business.service-CzHfftZk.js} +1 -1
- package/dist/esm/{check-pkg-version-2BU_KPHv.js → check-pkg-version-Cqb7EhvC.js} +2 -2
- package/dist/esm/{checkout.service-D-dEMyXF.js → checkout.service-BWdnJLVG.js} +1 -1
- package/dist/esm/checkouts-list-core.entry.js +1 -1
- package/dist/esm/{dispute.service-DPumDIuV.js → dispute.service-CqX5HR5o.js} +1 -1
- package/dist/esm/{get-payment-details-CD_K6FQ3.js → get-payment-details-D0T7bd_-.js} +1 -1
- package/dist/esm/{get-subaccounts-D1eF6c0B.js → get-subaccounts-Gil-SOoF.js} +1 -1
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/internal-tokenize-payment-method_7.entry.js +3 -3
- package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +1 -1
- package/dist/esm/justifi-additional-questions-form-step_9.entry.js +2 -2
- package/dist/esm/justifi-apple-pay_8.entry.js +241 -16
- package/dist/esm/justifi-business-details.entry.js +4 -4
- package/dist/esm/justifi-business-form.entry.js +4 -4
- package/dist/esm/justifi-checkout.entry.js +3 -3
- package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-checkouts-list.entry.js +5 -5
- package/dist/esm/justifi-dispute-management.entry.js +4 -4
- package/dist/esm/justifi-dispute-notification_3.entry.js +4 -4
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
- package/dist/esm/justifi-order-terminals.entry.js +5 -5
- package/dist/esm/justifi-owner-form_3.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +5 -5
- package/dist/esm/justifi-payment-provisioning.entry.js +4 -4
- package/dist/esm/justifi-payment-transactions-list.entry.js +4 -4
- package/dist/esm/justifi-payments-list.entry.js +4 -4
- package/dist/esm/justifi-payout-details.entry.js +4 -4
- package/dist/esm/justifi-payout-transactions-list.entry.js +4 -4
- package/dist/esm/justifi-payouts-list.entry.js +5 -5
- package/dist/esm/justifi-refund-payment.entry.js +5 -5
- package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list.entry.js +4 -4
- package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminals-list.entry.js +5 -5
- package/dist/esm/{package-Bx3wyDU2.js → package-CzedYX3W.js} +1 -1
- package/dist/esm/payment-details-core.entry.js +1 -1
- package/dist/esm/{payment.service-BreQSu6J.js → payment.service-CWyZF34P.js} +1 -1
- package/dist/esm/payments-list-core.entry.js +1 -1
- package/dist/esm/{payout.service-DuqRe6oq.js → payout.service-CkTievFG.js} +1 -1
- package/dist/esm/payouts-list-core.entry.js +1 -1
- package/dist/esm/terminal-orders-list-core.entry.js +2 -2
- package/dist/esm/{terminal-orders-table-DSo5x2D7.js → terminal-orders-table-OX3ZvzZy.js} +1 -1
- package/dist/esm/{terminal.service-CkzrYIA_.js → terminal.service-Bu5-dhum.js} +1 -1
- package/dist/esm/terminals-list-core.entry.js +1 -1
- package/dist/module/GooglePay.js +40 -9
- package/dist/module/google-pay.js +237 -12
- package/dist/module/package.js +1 -1
- package/dist/types/api/services/google-pay.service.d.ts +1 -1
- package/dist/webcomponents/{p-d2935214.entry.js → p-0437c330.entry.js} +1 -1
- package/dist/webcomponents/{p-16812327.entry.js → p-065b24c3.entry.js} +1 -1
- package/dist/webcomponents/{p-9a795f44.entry.js → p-14cbf366.entry.js} +1 -1
- package/dist/webcomponents/{p-3c006a15.entry.js → p-1e014ee7.entry.js} +1 -1
- package/dist/webcomponents/{p-ee122560.entry.js → p-20e66fc0.entry.js} +1 -1
- package/dist/webcomponents/{p-04154136.entry.js → p-22fdf7a4.entry.js} +1 -1
- package/dist/webcomponents/{p-d88d228f.entry.js → p-25755af4.entry.js} +1 -1
- package/dist/webcomponents/{p-38e1ef4b.entry.js → p-3d3a65ca.entry.js} +1 -1
- package/dist/webcomponents/p-3f291e6b.entry.js +1 -0
- package/dist/webcomponents/{p-5cba8448.entry.js → p-44011a41.entry.js} +1 -1
- package/dist/webcomponents/{p-88f58abe.entry.js → p-4ccd753b.entry.js} +1 -1
- package/dist/webcomponents/{p-03930216.entry.js → p-4f16a3ce.entry.js} +1 -1
- package/dist/webcomponents/{p-a87187c3.entry.js → p-50a32503.entry.js} +1 -1
- package/dist/webcomponents/{p-06ce1202.entry.js → p-57ed105e.entry.js} +1 -1
- package/dist/webcomponents/{p-b3f8d5d4.entry.js → p-5e3bc1dc.entry.js} +1 -1
- package/dist/webcomponents/{p-7bf6ded7.entry.js → p-62cfe9b6.entry.js} +1 -1
- package/dist/webcomponents/p-6a075da4.entry.js +1 -0
- package/dist/webcomponents/{p-b8426810.entry.js → p-88074dd7.entry.js} +1 -1
- package/dist/webcomponents/{p-7dbd0618.entry.js → p-8c16e4aa.entry.js} +1 -1
- package/dist/webcomponents/{p-404b3f02.entry.js → p-8ee61443.entry.js} +1 -1
- package/dist/webcomponents/{p-c88babbe.entry.js → p-8efea1e4.entry.js} +1 -1
- package/dist/webcomponents/p-A2FbmAEt.js +1 -0
- package/dist/webcomponents/{p-Dy5btfGV.js → p-B4W3my_D.js} +1 -1
- package/dist/webcomponents/{p-CQrwlULd.js → p-BrazW3nF.js} +1 -1
- package/dist/webcomponents/{p-BN1PYSFf.js → p-CIOILVyM.js} +1 -1
- package/dist/webcomponents/{p-BKM7YeAB.js → p-CPRPR6fJ.js} +1 -1
- package/dist/webcomponents/p-CzedYX3W.js +1 -0
- package/dist/webcomponents/{p-CVhnuewz.js → p-DUs94fK3.js} +1 -1
- package/dist/webcomponents/{p-C01zp4xw.js → p-DXnwIxTB.js} +1 -1
- package/dist/webcomponents/{p-t8p0WAW4.js → p-DeX_cIoV.js} +1 -1
- package/dist/webcomponents/{p-Cmb6PRFh.js → p-TKWqvm_A.js} +1 -1
- package/dist/webcomponents/{p-BxtmTjqW.js → p-Yp5v6wmS.js} +1 -1
- package/dist/webcomponents/{p-BVwVhXcQ.js → p-aZ8YkDMZ.js} +1 -1
- package/dist/webcomponents/{p-8f4adcfd.entry.js → p-aa42e3c1.entry.js} +1 -1
- package/dist/webcomponents/{p-ba0762f9.entry.js → p-ad0f8d85.entry.js} +1 -1
- package/dist/webcomponents/{p-7b610d9e.entry.js → p-b8c47cb1.entry.js} +1 -1
- package/dist/webcomponents/p-c11e6c03.entry.js +1 -0
- package/dist/webcomponents/{p-a9f75a9e.entry.js → p-c5af7149.entry.js} +1 -1
- package/dist/webcomponents/{p-13bdb5ed.entry.js → p-c7df4370.entry.js} +1 -1
- package/dist/webcomponents/p-cf9d8e1a.entry.js +1 -0
- package/dist/webcomponents/{p-0cd1c683.entry.js → p-d3663663.entry.js} +1 -1
- package/dist/webcomponents/{p-47f6d271.entry.js → p-daedfe82.entry.js} +1 -1
- package/dist/webcomponents/{p-9370cf0d.entry.js → p-dd11e67b.entry.js} +1 -1
- package/dist/webcomponents/{p-9065d67e.entry.js → p-e3ab5fe2.entry.js} +1 -1
- package/dist/webcomponents/{p-0412f491.entry.js → p-e95e27af.entry.js} +1 -1
- package/dist/webcomponents/{p-c63b0271.entry.js → p-f66778b8.entry.js} +1 -1
- package/dist/webcomponents/{p-1d04bd7a.entry.js → p-ff212635.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-42658888.entry.js +0 -1
- package/dist/webcomponents/p-43390a7f.entry.js +0 -1
- package/dist/webcomponents/p-BRbk6oSh.js +0 -1
- package/dist/webcomponents/p-Bx3wyDU2.js +0 -1
- package/dist/webcomponents/p-a0c9f0bd.entry.js +0 -1
- package/dist/webcomponents/p-e9d13cca.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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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
|
|
773
|
+
success,
|
|
745
774
|
data: result,
|
|
746
775
|
};
|
|
747
776
|
}
|
|
748
|
-
catch (
|
|
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
|
-
|
|
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 (
|
|
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
|
-
|
|
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
|
-
|
|
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
|
/**
|
|
@@ -1226,19 +1354,42 @@ const GooglePay = class {
|
|
|
1226
1354
|
this.showSkeleton = true;
|
|
1227
1355
|
this.handleGooglePayClick = async () => {
|
|
1228
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
|
+
});
|
|
1229
1363
|
if (this.isProcessing ||
|
|
1230
1364
|
this.disabled ||
|
|
1231
1365
|
!this.isAvailable ||
|
|
1232
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
|
+
});
|
|
1233
1373
|
return;
|
|
1234
1374
|
}
|
|
1235
1375
|
try {
|
|
1376
|
+
console.log('[GooglePay] handleGooglePayClick: Starting payment session');
|
|
1236
1377
|
this.isProcessing = true;
|
|
1237
1378
|
this.error = null;
|
|
1238
1379
|
this.googlePayStarted.emit();
|
|
1380
|
+
console.log('[GooglePay] handleGooglePayClick: googlePayStarted event emitted');
|
|
1239
1381
|
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1382
|
+
console.log('[GooglePay] handleGooglePayClick: Starting payment session with service', {
|
|
1383
|
+
hasAuthToken: !!checkoutStore.authToken,
|
|
1384
|
+
accountId: checkoutStore.accountId,
|
|
1385
|
+
});
|
|
1240
1386
|
const result = await this.googlePayService.startPaymentSession(paymentDataRequest, checkoutStore.authToken, checkoutStore.accountId);
|
|
1387
|
+
console.log('[GooglePay] handleGooglePayClick: Payment session result', result);
|
|
1241
1388
|
if (result.success) {
|
|
1389
|
+
console.log('[GooglePay] handleGooglePayClick: Payment successful', {
|
|
1390
|
+
paymentMethodId: result.paymentMethodId,
|
|
1391
|
+
hasPaymentData: !!result.paymentData,
|
|
1392
|
+
});
|
|
1242
1393
|
this.googlePayCompleted.emit({
|
|
1243
1394
|
success: true,
|
|
1244
1395
|
paymentData: result.paymentData,
|
|
@@ -1246,16 +1397,21 @@ const GooglePay = class {
|
|
|
1246
1397
|
});
|
|
1247
1398
|
}
|
|
1248
1399
|
else {
|
|
1400
|
+
console.error('[GooglePay] handleGooglePayClick: Payment failed', {
|
|
1401
|
+
error: result.error,
|
|
1402
|
+
});
|
|
1249
1403
|
this.googlePayCompleted.emit({
|
|
1250
1404
|
success: false,
|
|
1251
1405
|
error: result.error,
|
|
1252
1406
|
});
|
|
1253
1407
|
if (((_a = result.error) === null || _a === void 0 ? void 0 : _a.code) === "USER_CANCELLED") {
|
|
1408
|
+
console.log('[GooglePay] handleGooglePayClick: User cancelled payment');
|
|
1254
1409
|
this.googlePayCancelled.emit();
|
|
1255
1410
|
}
|
|
1256
1411
|
}
|
|
1257
1412
|
}
|
|
1258
1413
|
catch (error) {
|
|
1414
|
+
console.error('[GooglePay] handleGooglePayClick: Exception during payment', error);
|
|
1259
1415
|
const errorMessage = error instanceof Error ? error.message : "Payment failed";
|
|
1260
1416
|
this.error = errorMessage;
|
|
1261
1417
|
this.googlePayCompleted.emit({
|
|
@@ -1265,27 +1421,48 @@ const GooglePay = class {
|
|
|
1265
1421
|
}
|
|
1266
1422
|
finally {
|
|
1267
1423
|
this.isProcessing = false;
|
|
1424
|
+
console.log('[GooglePay] handleGooglePayClick: Payment flow complete', {
|
|
1425
|
+
isProcessing: this.isProcessing,
|
|
1426
|
+
error: this.error,
|
|
1427
|
+
});
|
|
1268
1428
|
}
|
|
1269
1429
|
};
|
|
1270
1430
|
}
|
|
1271
1431
|
watchConfigChange() {
|
|
1432
|
+
console.log('[GooglePay] watchConfigChange: Configuration changed', {
|
|
1433
|
+
merchantId: this.merchantId,
|
|
1434
|
+
environment: this.environment,
|
|
1435
|
+
});
|
|
1272
1436
|
this.initializeGooglePay();
|
|
1273
1437
|
}
|
|
1274
1438
|
componentWillLoad() {
|
|
1439
|
+
console.log('[GooglePay] componentWillLoad: Initializing GooglePayService');
|
|
1275
1440
|
this.googlePayService = new GooglePayService();
|
|
1441
|
+
console.log('[GooglePay] componentWillLoad: GooglePayService created', {
|
|
1442
|
+
service: this.googlePayService,
|
|
1443
|
+
});
|
|
1276
1444
|
}
|
|
1277
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
|
+
});
|
|
1278
1452
|
const unsub = onChange("paymentAmount", () => {
|
|
1453
|
+
console.log('[GooglePay] paymentAmount changed:', checkoutStore.paymentAmount);
|
|
1279
1454
|
this.prefetchPaymentData();
|
|
1280
1455
|
});
|
|
1281
1456
|
if (typeof unsub === 'function')
|
|
1282
1457
|
this.unsubscribes.push(unsub);
|
|
1283
1458
|
const unsubCurrency = onChange("paymentCurrency", () => {
|
|
1459
|
+
console.log('[GooglePay] paymentCurrency changed:', checkoutStore.paymentCurrency);
|
|
1284
1460
|
this.prefetchPaymentData();
|
|
1285
1461
|
});
|
|
1286
1462
|
if (typeof unsubCurrency === 'function')
|
|
1287
1463
|
this.unsubscribes.push(unsubCurrency);
|
|
1288
1464
|
const unsubDesc = onChange("paymentDescription", () => {
|
|
1465
|
+
console.log('[GooglePay] paymentDescription changed:', checkoutStore.paymentDescription);
|
|
1289
1466
|
this.prefetchPaymentData();
|
|
1290
1467
|
});
|
|
1291
1468
|
if (typeof unsubDesc === 'function')
|
|
@@ -1334,17 +1511,31 @@ const GooglePay = class {
|
|
|
1334
1511
|
* Prefetch payment data for faster load times of the Google Pay sheet.
|
|
1335
1512
|
*/
|
|
1336
1513
|
async prefetchPaymentData() {
|
|
1514
|
+
console.log('[GooglePay] prefetchPaymentData: Called', {
|
|
1515
|
+
isAvailable: this.isAvailable,
|
|
1516
|
+
canMakePayments: this.canMakePayments,
|
|
1517
|
+
});
|
|
1337
1518
|
if (!this.isAvailable || !this.canMakePayments) {
|
|
1519
|
+
console.warn('[GooglePay] prefetchPaymentData: Skipped - not available or cannot make payments');
|
|
1338
1520
|
return;
|
|
1339
1521
|
}
|
|
1340
1522
|
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1523
|
+
console.log('[GooglePay] prefetchPaymentData: Prefetching', { paymentDataRequest });
|
|
1341
1524
|
this.googlePayService.prefetchPaymentData(paymentDataRequest);
|
|
1525
|
+
console.log('[GooglePay] prefetchPaymentData: Prefetch complete');
|
|
1342
1526
|
}
|
|
1343
1527
|
async initializeGooglePay() {
|
|
1528
|
+
console.log('[GooglePay] initializeGooglePay: Starting initialization');
|
|
1344
1529
|
try {
|
|
1345
1530
|
this.isLoading = true;
|
|
1346
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
|
+
});
|
|
1347
1537
|
if (!checkoutStore.paymentAmount) {
|
|
1538
|
+
console.error('[GooglePay] initializeGooglePay: Missing payment amount');
|
|
1348
1539
|
this.error = "Missing required Google Pay configuration";
|
|
1349
1540
|
this.isLoading = false;
|
|
1350
1541
|
return;
|
|
@@ -1357,23 +1548,39 @@ const GooglePay = class {
|
|
|
1357
1548
|
buttonStyle: this.buttonStyle,
|
|
1358
1549
|
buttonSizeMode: this.buttonSizeMode,
|
|
1359
1550
|
};
|
|
1551
|
+
console.log('[GooglePay] initializeGooglePay: Config created', googlePayConfig);
|
|
1360
1552
|
this.googlePayService.initialize(googlePayConfig);
|
|
1553
|
+
console.log('[GooglePay] initializeGooglePay: Service initialized');
|
|
1361
1554
|
this.isAvailable = this.googlePayService.isAvailable();
|
|
1555
|
+
console.log('[GooglePay] initializeGooglePay: Availability check', {
|
|
1556
|
+
isAvailable: this.isAvailable,
|
|
1557
|
+
});
|
|
1362
1558
|
if (!this.isAvailable) {
|
|
1559
|
+
console.warn('[GooglePay] initializeGooglePay: Google Pay not available on device');
|
|
1363
1560
|
this.error = "Google Pay is not supported on this device";
|
|
1364
1561
|
this.isLoading = false;
|
|
1365
1562
|
return;
|
|
1366
1563
|
}
|
|
1564
|
+
console.log('[GooglePay] initializeGooglePay: Checking canMakePayments...');
|
|
1367
1565
|
this.canMakePayments = await this.googlePayService.canMakePayments();
|
|
1566
|
+
console.log('[GooglePay] initializeGooglePay: canMakePayments result', {
|
|
1567
|
+
canMakePayments: this.canMakePayments,
|
|
1568
|
+
});
|
|
1368
1569
|
if (!this.canMakePayments) {
|
|
1570
|
+
console.warn('[GooglePay] initializeGooglePay: Cannot make payments');
|
|
1369
1571
|
this.error = "Google Pay is not available for payments";
|
|
1370
1572
|
this.isLoading = false;
|
|
1371
1573
|
return;
|
|
1372
1574
|
}
|
|
1373
1575
|
const paymentDataRequest = this.createPaymentDataRequest();
|
|
1576
|
+
console.log('[GooglePay] initializeGooglePay: Prefetching payment data', {
|
|
1577
|
+
paymentDataRequest,
|
|
1578
|
+
});
|
|
1374
1579
|
this.googlePayService.prefetchPaymentData(paymentDataRequest);
|
|
1580
|
+
console.log('[GooglePay] initializeGooglePay: Initialization complete');
|
|
1375
1581
|
}
|
|
1376
1582
|
catch (error) {
|
|
1583
|
+
console.error('[GooglePay] initializeGooglePay: Error during initialization', error);
|
|
1377
1584
|
this.error =
|
|
1378
1585
|
error instanceof Error
|
|
1379
1586
|
? error.message
|
|
@@ -1381,19 +1588,37 @@ const GooglePay = class {
|
|
|
1381
1588
|
}
|
|
1382
1589
|
finally {
|
|
1383
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
|
+
});
|
|
1384
1597
|
}
|
|
1385
1598
|
}
|
|
1386
1599
|
createPaymentDataRequest() {
|
|
1387
|
-
|
|
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;
|
|
1388
1610
|
}
|
|
1389
1611
|
render() {
|
|
1390
1612
|
const showError = !this.isLoading && !!this.error;
|
|
1391
1613
|
const showDeviceUnavailable = !this.isLoading && !this.error && !this.isAvailable;
|
|
1392
1614
|
const showPaymentsUnavailable = !this.isLoading && !this.error && this.isAvailable && !this.canMakePayments;
|
|
1393
1615
|
const showButton = !this.isLoading && !this.error && this.isAvailable && this.canMakePayments;
|
|
1394
|
-
return (h(StyledHost, { key: '
|
|
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');
|
|
1395
1618
|
this.initializeGooglePay();
|
|
1396
|
-
}
|
|
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' }, `
|
|
1397
1622
|
.google-pay-container {
|
|
1398
1623
|
width: 100%;
|
|
1399
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-
|
|
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-
|
|
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-
|
|
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-
|
|
19
|
+
import './package-CzedYX3W.js';
|
|
20
20
|
|
|
21
21
|
const BusinessDetails = class {
|
|
22
22
|
constructor(hostRef) {
|
|
@@ -5,11 +5,11 @@ import { i as identitySchemaUSA, a as addressSchemaUSA, b as identitySchemaCAN,
|
|
|
5
5
|
import './config-state-C2NXATwF.js';
|
|
6
6
|
import './dinero-HXpYMWUU.js';
|
|
7
7
|
import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
|
|
8
|
-
import './GooglePay-
|
|
8
|
+
import './GooglePay-f7mYX17c.js';
|
|
9
9
|
import './Pagination-CLHwhyvu.js';
|
|
10
10
|
import { C as CountryCode, B as Business, b as BusinessFormServerErrors } from './Business-B5rtFhtR.js';
|
|
11
11
|
import './Dispute-BH0Xfn-F.js';
|
|
12
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
12
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-Cqb7EhvC.js';
|
|
13
13
|
import { B as Button } from './button-DBmjN7Ra.js';
|
|
14
14
|
import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
|
|
15
15
|
import { H as Header1 } from './header-1-CPF3S2CC.js';
|
|
@@ -17,7 +17,7 @@ import './event-types-CZfYo5-1.js';
|
|
|
17
17
|
import { S as Skeleton } from './skeleton-BmRZRW5K.js';
|
|
18
18
|
import { B as BusinessFormClickActions } from './event-types-XYgDHrVL.js';
|
|
19
19
|
import { m as makeGetBusiness, b as makePatchBusiness } from './payment-provisioning-actions-ONP8lDnV.js';
|
|
20
|
-
import { B as BusinessService } from './business.service-
|
|
20
|
+
import { B as BusinessService } from './business.service-CzHfftZk.js';
|
|
21
21
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
22
22
|
import './schema-validations-B5sfox_4.js';
|
|
23
23
|
import './country-config-BQ4D46Lb.js';
|
|
@@ -25,7 +25,7 @@ import './business-form-options-D6s5H4RI.js';
|
|
|
25
25
|
import './index-B-fWxE5e.js';
|
|
26
26
|
import './utils-CIaHqjQt.js';
|
|
27
27
|
import './index-DkoufM1t.js';
|
|
28
|
-
import './package-
|
|
28
|
+
import './package-CzedYX3W.js';
|
|
29
29
|
import './Api-DX-IWyBw.js';
|
|
30
30
|
import './parts-wtuY7MT2.js';
|
|
31
31
|
import './utils-BeQLScSm.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-DwYM91AU.js';
|
|
2
|
-
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-
|
|
3
|
-
import { c as checkoutStore } from './GooglePay-
|
|
2
|
+
import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-Cqb7EhvC.js';
|
|
3
|
+
import { c as checkoutStore } from './GooglePay-f7mYX17c.js';
|
|
4
4
|
import { d as checkoutSummary } from './parts-wtuY7MT2.js';
|
|
5
5
|
import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
|
|
6
6
|
import './event-types-CZfYo5-1.js';
|
|
7
7
|
import { P as PAYMENT_METHODS } from './index-DkoufM1t.js';
|
|
8
|
-
import './package-
|
|
8
|
+
import './package-CzedYX3W.js';
|
|
9
9
|
import './Api-DX-IWyBw.js';
|
|
10
10
|
import './config-state-C2NXATwF.js';
|
|
11
11
|
import './index-B-fWxE5e.js';
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, h } from './index-DwYM91AU.js';
|
|
|
2
2
|
import './config-state-C2NXATwF.js';
|
|
3
3
|
import './dinero-HXpYMWUU.js';
|
|
4
4
|
import './ComponentError-Cjcsf8ku.js';
|
|
5
|
-
import { I as ICheckoutStatus, a as ICheckoutPaymentModeParam } from './GooglePay-
|
|
5
|
+
import { I as ICheckoutStatus, a as ICheckoutPaymentModeParam } from './GooglePay-f7mYX17c.js';
|
|
6
6
|
import './Pagination-CLHwhyvu.js';
|
|
7
7
|
import './Business-B5rtFhtR.js';
|
|
8
8
|
import './Dispute-BH0Xfn-F.js';
|